<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240509180508 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE tbl_lapin ADD production_id INT DEFAULT NULL AFTER vente_id');
$this->addSql('ALTER TABLE tbl_lapin ADD CONSTRAINT FK_FDDA43C9ECC6147F FOREIGN KEY (production_id) REFERENCES tbl_lapin_production (id)');
$this->addSql('CREATE INDEX IDX_FDDA43C9ECC6147F ON tbl_lapin (production_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE tbl_lapin DROP FOREIGN KEY FK_FDDA43C9ECC6147F');
$this->addSql('DROP INDEX IDX_FDDA43C9ECC6147F ON tbl_lapin');
$this->addSql('ALTER TABLE tbl_lapin DROP production_id');
}
}