vendor/bluue/suppliers-bundle/migrations/Version20240819093716.php line 1

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