<?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 Version20211230162629 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 reseau_division (id INT AUTO_INCREMENT NOT NULL, reseau_id INT DEFAULT NULL, code VARCHAR(255) DEFAULT NULL, nom VARCHAR(255) DEFAULT NULL, INDEX IDX_9F5C9332445D170C (reseau_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE reseau_division ADD CONSTRAINT FK_9F5C9332445D170C FOREIGN KEY (reseau_id) REFERENCES reseau (id)');
$this->addSql('ALTER TABLE reseau DROP code');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE reseau_division');
$this->addSql('ALTER TABLE reseau ADD code VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`');
}
}