<?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 Version20240407150618 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('CREATE TABLE tbl_lapin (id INT AUTO_INCREMENT NOT NULL, sexe_id INT DEFAULT NULL, type_lapin_id INT DEFAULT NULL, mere_id INT DEFAULT NULL, date_naissance DATE NOT NULL, INDEX IDX_FDDA43C9448F3B3C (sexe_id), INDEX IDX_FDDA43C9DFA18EDF (type_lapin_id), INDEX IDX_FDDA43C939DEC40E (mere_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE tbl_lapin ADD CONSTRAINT FK_FDDA43C9448F3B3C FOREIGN KEY (sexe_id) REFERENCES ref_sexe_lapin (id)');
$this->addSql('ALTER TABLE tbl_lapin ADD CONSTRAINT FK_FDDA43C9DFA18EDF FOREIGN KEY (type_lapin_id) REFERENCES ref_type_lapin (id)');
$this->addSql('ALTER TABLE tbl_lapin ADD CONSTRAINT FK_FDDA43C939DEC40E FOREIGN KEY (mere_id) REFERENCES tbl_lapin_production (id)');
$this->addSql('ALTER TABLE tbl_production ADD adoption_enfants INT DEFAULT NULL AFTER mort_enfants');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
}
}