vendor/bluue/sales-bundle/migrations/Version20231226085012.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace SalesBundleMigrations;
  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 Version20231226085012 extends AbstractMigration
  10. {
  11.     public function up(Schema $schema): void
  12.     {
  13.         // this up() migration is auto-generated, please modify it to your needs
  14.         $this->addSql('ALTER TABLE sales_bundle__payment_method ADD bank_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
  15.         $this->addSql('ALTER TABLE sales_bundle__payment_method ADD CONSTRAINT FK_69C1A5D611C8FB41 FOREIGN KEY (bank_id) REFERENCES sales_bundle__bank (id)');
  16.         $this->addSql('CREATE INDEX IDX_69C1A5D611C8FB41 ON sales_bundle__payment_method (bank_id)');
  17.     }
  18.     public function down(Schema $schema): void
  19.     {
  20.         // this down() migration is auto-generated, please modify it to your needs
  21.         $this->addSql('ALTER TABLE sales_bundle__payment_method DROP FOREIGN KEY FK_69C1A5D611C8FB41');
  22.         $this->addSql('DROP INDEX IDX_69C1A5D611C8FB41 ON sales_bundle__payment_method');
  23.         $this->addSql('ALTER TABLE sales_bundle__payment_method DROP bank_id');
  24.     }
  25. }