<?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 Version20220225083936 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 infos_residence ADD created_at DATETIME NOT NULL, ADD updated_at DATETIME NOT NULL, ADD is_translated TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE package ADD created_at DATETIME NOT NULL, ADD updated_at DATETIME NOT NULL, CHANGE id_iresa id_iresa INT DEFAULT NULL');
$this->addSql('ALTER TABLE typologie ADD created_at DATETIME NOT NULL, ADD updated_at DATETIME NOT NULL');
$this->addSql('ALTER TABLE infos_formule_base ADD created_at DATETIME NOT NULL, ADD updated_at DATETIME NOT NULL, ADD is_translated TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE theme ADD created_at DATETIME NOT NULL, ADD updated_at DATETIME NOT NULL, ADD is_translated TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE service ADD created_at DATETIME NOT NULL, ADD updated_at DATETIME NOT NULL');
$this->addSql('ALTER TABLE destination ADD is_translated TINYINT(1) NOT NULL');
}
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 destination DROP is_translated');
$this->addSql('ALTER TABLE infos_formule_base DROP created_at, DROP updated_at, DROP is_translated');
$this->addSql('ALTER TABLE infos_residence DROP created_at, DROP updated_at, DROP is_translated');
$this->addSql('ALTER TABLE package DROP created_at, DROP updated_at, CHANGE id_iresa id_iresa INT NOT NULL');
$this->addSql('ALTER TABLE service DROP created_at, DROP updated_at');
$this->addSql('ALTER TABLE theme DROP created_at, DROP updated_at, DROP is_translated');
$this->addSql('ALTER TABLE typologie DROP created_at, DROP updated_at');
}
}