<?php
declare(strict_types=1);
namespace RecurringInvoicesBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20230208085833 extends AbstractMigration
{
public function up(Schema $schema): void
{
$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');
$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)');
$this->addSql('CREATE INDEX IDX_BD96F06818E465C6 ON recurring_invoices_bundle__recurring_invoice_line (pack_parent_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE recurring_invoices_bundle__recurring_invoice_line DROP FOREIGN KEY FK_BD96F06818E465C6');
$this->addSql('DROP INDEX IDX_BD96F06818E465C6 ON recurring_invoices_bundle__recurring_invoice_line');
$this->addSql('ALTER TABLE recurring_invoices_bundle__recurring_invoice_line DROP pack_parent_id, DROP is_pack');
}
}