<?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 Version20211221093404 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 diagnostic_erp (id INT NOT NULL, pprn TINYINT(1) NOT NULL, pprm TINYINT(1) NOT NULL, pprt TINYINT(1) NOT NULL, risque_sismique INT NOT NULL, radon TINYINT(1) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE diagnostic_erp ADD CONSTRAINT FK_10AF3D1ABF396750 FOREIGN KEY (id) REFERENCES diagnostic (id) ON DELETE CASCADE');
$this->addSql('DROP TABLE diagnostic_esris');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE diagnostic_esris (id INT NOT NULL, pprn TINYINT(1) NOT NULL, pprm TINYINT(1) NOT NULL, pprt TINYINT(1) NOT NULL, risque_sismique INT NOT NULL, radon TINYINT(1) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE diagnostic_esris ADD CONSTRAINT FK_6F97F7F9BF396750 FOREIGN KEY (id) REFERENCES diagnostic (id) ON DELETE CASCADE');
$this->addSql('DROP TABLE diagnostic_erp');
}
}