vendor/bluue/products-bundle/migrations/Version20240517094054.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace ProductsBundleMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. final class Version20240517094054 extends AbstractMigration
  7. {
  8.     public function up(Schema $schema): void
  9.     {
  10.         $this->addSql('ALTER TABLE products_bundle__substitute_product ADD deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD deleted_at DATETIME DEFAULT NULL');
  11.         $this->addSql('ALTER TABLE products_bundle__substitute_product ADD CONSTRAINT FK_A685F3F8C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
  12.         $this->addSql('CREATE INDEX IDX_A685F3F8C76F1F52 ON products_bundle__substitute_product (deleted_by_id)');
  13.     }
  14.     public function down(Schema $schema): void
  15.     {
  16.         $this->addSql('ALTER TABLE products_bundle__substitute_product DROP FOREIGN KEY FK_A685F3F8C76F1F52');
  17.         $this->addSql('DROP INDEX IDX_A685F3F8C76F1F52 ON products_bundle__substitute_product');
  18.         $this->addSql('ALTER TABLE products_bundle__substitute_product DROP deleted_by_id, DROP deleted_at');
  19.     }
  20. }