<?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 Version20221010143641 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 block_objet (id INT AUTO_INCREMENT NOT NULL, config_section_id INT NOT NULL, objet_id INT NOT NULL, valeur LONGTEXT DEFAULT NULL, INDEX IDX_81DC8ADE802A795C (config_section_id), INDEX IDX_81DC8ADEF520CF5A (objet_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE block_objet ADD CONSTRAINT FK_81DC8ADE802A795C FOREIGN KEY (config_section_id) REFERENCES config_section (id)');
$this->addSql('ALTER TABLE block_objet ADD CONSTRAINT FK_81DC8ADEF520CF5A FOREIGN KEY (objet_id) REFERENCES objet (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE block_objet');
}
}