src/Migrations/Version20201025202301.php line 1
<?phpdeclare(strict_types=1);namespace DoctrineMigrations;use Doctrine\DBAL\Schema\Schema;use Doctrine\Migrations\AbstractMigration;/*** Auto-generated Migration: Please modify to your needs!*/final class Version20201025202301 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 university_category_relation (organisation_id INT NOT NULL, university_category_id INT NOT NULL, INDEX IDX_EFBAC27D9E6B1585 (organisation_id), INDEX IDX_EFBAC27D21D6F15 (university_category_id), PRIMARY KEY(organisation_id, university_category_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');$this->addSql('ALTER TABLE university_category_relation ADD CONSTRAINT FK_EFBAC27D9E6B1585 FOREIGN KEY (organisation_id) REFERENCES organisation (id) ON DELETE CASCADE');$this->addSql('ALTER TABLE university_category_relation ADD CONSTRAINT FK_EFBAC27D21D6F15 FOREIGN KEY (university_category_id) REFERENCES university_categories (id) ON DELETE CASCADE');$this->addSql('DROP TABLE university_category_organisation');$this->addSql('ALTER TABLE organisation CHANGE have_dorm have_dorm TINYINT(1) DEFAULT \'0\' NOT NULL, CHANGE have_military_department have_military_department TINYINT(1) DEFAULT \'0\' NOT NULL');}public function down(Schema $schema): void{// this down() migration is auto-generated, please modify it to your needs$this->addSql('CREATE TABLE university_category_organisation (university_category_id INT NOT NULL, organisation_id INT NOT NULL, INDEX IDX_19341E849E6B1585 (organisation_id), INDEX IDX_19341E8421D6F15 (university_category_id), PRIMARY KEY(university_category_id, organisation_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');$this->addSql('ALTER TABLE university_category_organisation ADD CONSTRAINT FK_19341E8421D6F15 FOREIGN KEY (university_category_id) REFERENCES university_categories (id) ON DELETE CASCADE');$this->addSql('ALTER TABLE university_category_organisation ADD CONSTRAINT FK_19341E849E6B1585 FOREIGN KEY (organisation_id) REFERENCES organisation (id) ON DELETE CASCADE');$this->addSql('DROP TABLE university_category_relation');$this->addSql('ALTER TABLE organisation CHANGE have_dorm have_dorm TINYINT(1) NOT NULL, CHANGE have_military_department have_military_department TINYINT(1) NOT NULL');}}