migrations/Delete/Version20250215174513_InvoicingProformaBoxMap.php line 1
<?php
declare(strict_types=1);
namespace DoctrineMigrations\Delete;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20250215174513_InvoicingProformaBoxMap extends AbstractMigration
{
public function getDescription(): string
{
return 'Add proforma to boxes association';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE invoicing_proforma_box_map (
proforma_id INTEGER NOT NULL REFERENCES public.invoicing_proforma (id),
box_id INTEGER NOT NULL REFERENCES public.expediting_z_box (id),
PRIMARY KEY (proforma_id, box_id)
)');
$this->addSql('CREATE INDEX invoicing_proforma_box_map_proforma_id_idx ON invoicing_proforma_box_map (box_id)');
$this->addSql('CREATE INDEX invoicing_proforma_box_map_box_id_idx ON invoicing_proforma_box_map (box_id)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE IF EXISTS invoicing_proforma_box_map');
}
}