<?php declare(strict_types=1);
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20191224113135 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('CREATE TABLE infos_residence (id INT AUTO_INCREMENT NOT NULL, residence_id INT NOT NULL, res_lieu VARCHAR(255) DEFAULT NULL, picto_theme VARCHAR(255) DEFAULT NULL, info_adress LONGTEXT DEFAULT NULL, info_gps VARCHAR(255) DEFAULT NULL, info_gmap LONGTEXT DEFAULT NULL, seo_title VARCHAR(255) DEFAULT NULL, seo_desc LONGTEXT DEFAULT NULL, res_bigdesc LONGTEXT DEFAULT NULL, plus_infos_residence LONGTEXT DEFAULT NULL, res_shortdesc LONGTEXT DEFAULT NULL, ouverture LONGTEXT DEFAULT NULL, plus LONGTEXT DEFAULT NULL, plus_ateya_family LONGTEXT DEFAULT NULL, plus_ateya_bienetre LONGTEXT DEFAULT NULL, plus_mention LONGTEXT DEFAULT NULL, UNIQUE INDEX UNIQ_9AF8D8828B225FBD (residence_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET UTF8 COLLATE `UTF8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE infos_residence ADD CONSTRAINT FK_9AF8D8828B225FBD FOREIGN KEY (residence_id) REFERENCES residence (id)');
$this->addSql('ALTER TABLE media_residence DROP size');
}
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('DROP TABLE infos_residence');
$this->addSql('ALTER TABLE media_residence ADD size INT DEFAULT NULL');
}
}