migrations/Version20230707122427.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 Version20230707122427 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('ALTER TABLE preference_notification DROP FOREIGN KEY FK_42D2B37DA76ED395');$this->addSql('ALTER TABLE admin_notification DROP FOREIGN KEY FK_C615D4279D5D70F2');$this->addSql('DROP TABLE preference_notification');$this->addSql('DROP TABLE admin_notification');}public function down(Schema $schema): void{// this down() migration is auto-generated, please modify it to your needs$this->addSql('CREATE TABLE preference_notification (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, active TINYINT(1) NOT NULL, INDEX IDX_42D2B37DA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');$this->addSql('CREATE TABLE admin_notification (id INT AUTO_INCREMENT NOT NULL, preference_notification_id INT NOT NULL, type VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, title LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_C615D4279D5D70F2 (preference_notification_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');$this->addSql('ALTER TABLE preference_notification ADD CONSTRAINT FK_42D2B37DA76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE NO ACTION');$this->addSql('ALTER TABLE admin_notification ADD CONSTRAINT FK_C615D4279D5D70F2 FOREIGN KEY (preference_notification_id) REFERENCES preference_notification (id) ON UPDATE NO ACTION ON DELETE NO ACTION');}}