vendor/bluue/recurring-invoices-bundle/migrations/Version20230208085833.php line 1

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