migrations/Delete/Version20241210131512_InventoryWithdrawalObservation.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 Version20241210131512_InventoryWithdrawalObservation extends AbstractMigration
{
public function getDescription(): string
{
return 'Link an observation to a withdrawal';
}
public function up(Schema $schema): void
{
$this->addSql("ALTER TABLE public.observation ADD CONSTRAINT observation_withdrawal_id_fkey FOREIGN KEY (withdrawal_id) REFERENCES public.inventory_x_withdrawal (id) NOT DEFERRABLE INITIALLY IMMEDIATE");
}
public function down(Schema $schema): void
{
$this->addSql("ALTER TABLE public.observation DROP CONSTRAINT observation_withdrawal_id_fkey");
}
}