<?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 Version20240207091824 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 assurance ADD nom VARCHAR(255) NOT NULL, DROP assurance, DROP formule');
$this->addSql('ALTER TABLE catalog_order ADD pays_id INT NOT NULL, DROP pays, CHANGE catalogues catalogues LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\'');
$this->addSql('ALTER TABLE catalog_order ADD CONSTRAINT FK_4C3AF221A6E44244 FOREIGN KEY (pays_id) REFERENCES pays (id)');
$this->addSql('CREATE INDEX IDX_4C3AF221A6E44244 ON catalog_order (pays_id)');
$this->addSql('ALTER TABLE infos_discover CHANGE code_traduction code_traduction VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE infos_discover_link CHANGE code_traduction code_traduction VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE infos_event CHANGE code_traduction code_traduction VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE media_residence CHANGE lang_id lang_id INT NOT NULL');
$this->addSql('UPDATE page SET is_translated = 0 WHERE is_translated IS NULL');
$this->addSql('ALTER TABLE page CHANGE is_translated is_translated TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE typologie CHANGE lang_id lang_id INT DEFAULT NULL, CHANGE nom nom VARCHAR(255) DEFAULT NULL, CHANGE idiresa idiresa INT DEFAULT NULL, CHANGE cap_min cap_min INT DEFAULT NULL, CHANGE cap_max cap_max INT DEFAULT NULL, CHANGE pax_max pax_max INT DEFAULT NULL, CHANGE pax_min pax_min INT DEFAULT NULL, CHANGE res_pmr res_pmr TINYINT(1) DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE assurance ADD assurance VARCHAR(255) DEFAULT NULL, ADD formule VARCHAR(255) DEFAULT NULL, DROP nom');
$this->addSql('ALTER TABLE catalog_order DROP FOREIGN KEY FK_4C3AF221A6E44244');
$this->addSql('DROP INDEX IDX_4C3AF221A6E44244 ON catalog_order');
$this->addSql('ALTER TABLE catalog_order ADD pays VARCHAR(255) NOT NULL, DROP pays_id, CHANGE catalogues catalogues LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\'');
$this->addSql('ALTER TABLE infos_discover CHANGE code_traduction code_traduction VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE infos_discover_link CHANGE code_traduction code_traduction VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE infos_event CHANGE code_traduction code_traduction VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE media_residence CHANGE lang_id lang_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE page CHANGE is_translated is_translated TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE transaction ADD date_created DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE typologie CHANGE lang_id lang_id INT DEFAULT 1, CHANGE nom nom VARCHAR(255) NOT NULL, CHANGE idiresa idiresa INT NOT NULL, CHANGE cap_min cap_min INT NOT NULL, CHANGE cap_max cap_max INT NOT NULL, CHANGE pax_max pax_max INT DEFAULT 0, CHANGE pax_min pax_min INT DEFAULT 0, CHANGE res_pmr res_pmr TINYINT(1) DEFAULT 0');
}
}