migrations/Version20220221182009.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.  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  10.  */
  11. final class Version20220221182009 extends AbstractMigration
  12. {
  13.     public function getDescription(): string
  14.     {
  15.         return '';
  16.     }
  17.     public function up(Schema $schema): void
  18.     {
  19.         // this up() migration is auto-generated, please modify it to your needs
  20.         $this->addSql('ALTER TABLE eckinox_app_reset_password_requests DROP selector, DROP hashed_token, DROP requested_at, DROP expires_at');
  21.         $this->addSql('ALTER TABLE eckinox_reset_password_requests DROP selector, DROP hashed_token, DROP requested_at, DROP expires_at');
  22.         $this->addSql('ALTER TABLE mallette_file_notification DROP FOREIGN KEY FK_E6314BFD19EB6921');
  23.         $this->addSql('DROP INDEX IDX_E6314BFD19EB6921 ON mallette_file_notification');
  24.         $this->addSql('ALTER TABLE mallette_file_notification DROP client_id');
  25.     }
  26.     public function down(Schema $schema): void
  27.     {
  28.         // this down() migration is auto-generated, please modify it to your needs
  29.         $this->addSql('ALTER TABLE eckinox_app_reset_password_requests ADD selector VARCHAR(20) NOT NULL, ADD hashed_token VARCHAR(100) NOT NULL, ADD requested_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', ADD expires_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\'');
  30.         $this->addSql('ALTER TABLE eckinox_reset_password_requests ADD selector VARCHAR(20) NOT NULL, ADD hashed_token VARCHAR(100) NOT NULL, ADD requested_at DATETIME NOT NULL, ADD expires_at DATETIME NOT NULL');
  31.         $this->addSql('ALTER TABLE mallette_file_notification ADD client_id INT NOT NULL');
  32.         $this->addSql('ALTER TABLE mallette_file_notification ADD CONSTRAINT FK_E6314BFD19EB6921 FOREIGN KEY (client_id) REFERENCES mallette_client (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
  33.         $this->addSql('CREATE INDEX IDX_E6314BFD19EB6921 ON mallette_file_notification (client_id)');
  34.     }
  35.     public function isTransactional(): bool
  36.     {
  37.         return false;
  38.     }
  39. }