vendor/bluue/utility-bills-bundle/migrations/Version20240307091233.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace UtilityBillsBundleMigrations;
  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 Version20240307091233 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('CREATE TABLE utility_bills_bundle__utility_bill_order (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', utility_bill_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', supplier_order_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', INDEX IDX_CFF99CDA36287E91 (utility_bill_id), INDEX IDX_CFF99CDA1605B9 (supplier_order_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  15.         $this->addSql('ALTER TABLE utility_bills_bundle__utility_bill_order ADD CONSTRAINT FK_CFF99CDA36287E91 FOREIGN KEY (utility_bill_id) REFERENCES utility_bills_bundle__utility_bill (id)');
  16.         $this->addSql('ALTER TABLE utility_bills_bundle__utility_bill_order ADD CONSTRAINT FK_CFF99CDA1605B9 FOREIGN KEY (supplier_order_id) REFERENCES suppliers_orders_bundle__supplier_order (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 utility_bills_bundle__utility_bill_order DROP FOREIGN KEY FK_CFF99CDA36287E91');
  22.         $this->addSql('ALTER TABLE utility_bills_bundle__utility_bill_order DROP FOREIGN KEY FK_CFF99CDA1605B9');
  23.         $this->addSql('DROP TABLE utility_bills_bundle__utility_bill_order');
  24.     }
  25. }