migrations/Version20241003165247.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20241003165247 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('ALTER TABLE notification_users DROP FOREIGN KEY FK_D23740101515162A');
  19.         $this->addSql('ALTER TABLE notification_users DROP FOREIGN KEY FK_D23740109230F071');
  20.         $this->addSql('DROP INDEX IDX_D23740109230F071 ON notification_users');
  21.         $this->addSql('DROP INDEX IDX_D23740101515162A ON notification_users');
  22.         $this->addSql('ALTER TABLE notification_users DROP reminders_notification_system_id, DROP reminders_notification_email_id, DROP reminders_notification_system_is_active, DROP reminders_notification_email_is_active');
  23.     }
  24.     public function down(Schema $schema): void
  25.     {
  26.         // this down() migration is auto-generated, please modify it to your needs
  27.         $this->addSql('ALTER TABLE notification_users ADD reminders_notification_system_id INT DEFAULT NULL, ADD reminders_notification_email_id INT DEFAULT NULL, ADD reminders_notification_system_is_active TINYINT(1) NOT NULL, ADD reminders_notification_email_is_active TINYINT(1) NOT NULL');
  28.         $this->addSql('ALTER TABLE notification_users ADD CONSTRAINT FK_D23740101515162A FOREIGN KEY (reminders_notification_system_id) REFERENCES notification (id)');
  29.         $this->addSql('ALTER TABLE notification_users ADD CONSTRAINT FK_D23740109230F071 FOREIGN KEY (reminders_notification_email_id) REFERENCES notification (id)');
  30.         $this->addSql('CREATE INDEX IDX_D23740109230F071 ON notification_users (reminders_notification_email_id)');
  31.         $this->addSql('CREATE INDEX IDX_D23740101515162A ON notification_users (reminders_notification_system_id)');
  32.     }
  33. }