<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220506004839 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE invoice_type (id INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE invoice_type ADD CONSTRAINT FK_8E1B354CBF396750 FOREIGN KEY (id) REFERENCES choice_element (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE invoice_deposit ADD type_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE invoice_deposit ADD CONSTRAINT FK_6702ABEAC54C8C93 FOREIGN KEY (type_id) REFERENCES invoice_type (id)');
$this->addSql('CREATE INDEX IDX_6702ABEAC54C8C93 ON invoice_deposit (type_id)');
$this->addSql('ALTER TABLE provider ADD current_document LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\'');
$this->addSql('ALTER TABLE recruitment_campaign DROP nb_request');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE invoice_deposit DROP FOREIGN KEY FK_6702ABEAC54C8C93');
$this->addSql('DROP TABLE invoice_type');
$this->addSql('DROP INDEX IDX_6702ABEAC54C8C93 ON invoice_deposit');
$this->addSql('ALTER TABLE invoice_deposit DROP type_id');
$this->addSql('ALTER TABLE provider DROP current_document');
$this->addSql('ALTER TABLE recruitment_campaign ADD nb_request INT NOT NULL');
}
}