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