<?php
declare(strict_types=1);
namespace RecurringInvoicesBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20240603132749 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE recurring_invoices_bundle__recurring_invoice ADD establishment_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE recurring_invoices_bundle__recurring_invoice ADD CONSTRAINT FK_6B9712E8565851 FOREIGN KEY (establishment_id) REFERENCES establishment (id)');
$this->addSql('CREATE INDEX IDX_6B9712E8565851 ON recurring_invoices_bundle__recurring_invoice (establishment_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE recurring_invoices_bundle__recurring_invoice DROP FOREIGN KEY FK_6B9712E8565851');
$this->addSql('DROP INDEX IDX_6B9712E8565851 ON recurring_invoices_bundle__recurring_invoice');
$this->addSql('ALTER TABLE recurring_invoices_bundle__recurring_invoice DROP establishment_id');
}
}