<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20211006093921 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE typologie ADD code_traduction VARCHAR(255) DEFAULT NULL, ADD lang_id INT DEFAULT 1, ADD res_personne VARCHAR(255) DEFAULT NULL, ADD pax_max INT DEFAULT 0, ADD pax_min INT DEFAULT 0, ADD res_superficie VARCHAR(255) DEFAULT NULL, ADD res_pmr TINYINT(1) DEFAULT 0, ADD rub_big_desc LONGTEXT DEFAULT NULL, ADD mise_avant LONGTEXT DEFAULT NULL, ADD mise_avant_desc LONGTEXT DEFAULT NULL');
$this->addSql('ALTER TABLE typologie ADD CONSTRAINT FK_166B84EDB213FA4 FOREIGN KEY (lang_id) REFERENCES language (id)');
$this->addSql('CREATE INDEX IDX_166B84EDB213FA4 ON typologie (lang_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE typologie DROP FOREIGN KEY FK_166B84EDB213FA4');
$this->addSql('DROP INDEX IDX_166B84EDB213FA4 ON typologie');
$this->addSql('ALTER TABLE typologie DROP lang_id, DROP res_typo, DROP res_personne, DROP res_superficie, DROP res_pmr, DROP rub_big_desc, DROP mise_avant, DROP mise_avant_desc');
}
}