vendor/bluue/recurring-invoices-bundle/migrations/Version20230825082629.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 Version20230825082629 extends AbstractMigration
  7. {
  8.     public function up(Schema $schema): void
  9.     {
  10.         $this->addSql('ALTER TABLE recurring_invoices_bundle__recurring_invoice ADD quotation_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
  11.         $this->addSql('ALTER TABLE recurring_invoices_bundle__recurring_invoice ADD CONSTRAINT FK_6B9712EB4EA4E60 FOREIGN KEY (quotation_id) REFERENCES sales_bundle__quotation (id)');
  12.         $this->addSql('CREATE INDEX IDX_6B9712EB4EA4E60 ON recurring_invoices_bundle__recurring_invoice (quotation_id)');
  13.     }
  14.     public function down(Schema $schema): void
  15.     {
  16.         $this->addSql('ALTER TABLE recurring_invoices_bundle__recurring_invoice DROP FOREIGN KEY FK_6B9712EB4EA4E60');
  17.         $this->addSql('DROP INDEX IDX_6B9712EB4EA4E60 ON recurring_invoices_bundle__recurring_invoice');
  18.         $this->addSql('ALTER TABLE recurring_invoices_bundle__recurring_invoice DROP quotation_id');
  19.     }
  20. }