<?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 Version20220106133257 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 demande_diagnostic ADD is_enabled TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE demande_diagnostic_patrimoine ADD is_enabled TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE diagnostic ADD reference_opac VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE diagnostic_dpe CHANGE etiquette_energetique etiquette_energetique VARCHAR(10) NOT NULL, CHANGE etiquette_ges etiquette_ges VARCHAR(10) NOT NULL, CHANGE consommation_energie_final consommation_energie_final INT DEFAULT NULL, CHANGE cout_annuel_fourchette_basse cout_annuel_fourchette_basse INT DEFAULT NULL, CHANGE cout_annuel_fourchette_haute cout_annuel_fourchette_haute INT DEFAULT NULL, CHANGE date_valeur_prix date_valeur_prix DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', CHANGE confort_ete confort_ete VARCHAR(250) DEFAULT NULL');
$this->addSql('ALTER TABLE diagnostic_erp CHANGE risque_sismique risque_sismique INT DEFAULT NULL, CHANGE radon radon TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE enregistrement_diagnostic ADD reference_opac VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE user ADD reference_opac INT DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE demande_diagnostic DROP is_enabled');
$this->addSql('ALTER TABLE demande_diagnostic_patrimoine DROP is_enabled');
$this->addSql('ALTER TABLE diagnostic DROP reference_opac');
$this->addSql('ALTER TABLE diagnostic_dpe CHANGE etiquette_energetique etiquette_energetique VARCHAR(1) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE etiquette_ges etiquette_ges VARCHAR(1) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE consommation_energie_final consommation_energie_final INT NOT NULL, CHANGE cout_annuel_fourchette_basse cout_annuel_fourchette_basse INT NOT NULL, CHANGE cout_annuel_fourchette_haute cout_annuel_fourchette_haute INT NOT NULL, CHANGE date_valeur_prix date_valeur_prix DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', CHANGE confort_ete confort_ete VARCHAR(250) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE diagnostic_erp CHANGE risque_sismique risque_sismique INT NOT NULL, CHANGE radon radon TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE enregistrement_diagnostic DROP reference_opac');
$this->addSql('ALTER TABLE user DROP reference_opac');
}
}