<?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 Version20250202154024 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 inspiration ADD is_visible TINYINT(1) DEFAULT 1 NOT NULL');
$this->addSql('ALTER TABLE opinion ADD is_visible TINYINT(1) DEFAULT 1 NOT NULL');
$this->addSql('ALTER TABLE outdoor_safety ADD is_visible TINYINT(1) DEFAULT 1 NOT NULL');
$this->addSql('ALTER TABLE page ADD is_visible TINYINT(1) DEFAULT 1 NOT NULL');
$this->addSql('ALTER TABLE route ADD is_visible TINYINT(1) DEFAULT 1 NOT NULL, CHANGE code_name code_name VARCHAR(255) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE UNIQUE INDEX bus_stop_map_plus_code_route_id ON bus_stop (map_plus_code, route_id)');
$this->addSql('CREATE UNIQUE INDEX bus_stop_name_route_id ON bus_stop (name, route_id)');
$this->addSql('ALTER TABLE coupon ADD created_at DATETIME DEFAULT NULL, ADD updated_at DATETIME DEFAULT NULL, CHANGE discount_percentage discount_percentage INT NOT NULL, CHANGE partner_commission_percentage partner_commission_percentage NUMERIC(5, 2) DEFAULT NULL');
$this->addSql('ALTER TABLE domain_lang DROP FOREIGN KEY FK_9CD5A905EA9FDD75');
$this->addSql('DROP INDEX IDX_9CD5A905EA9FDD75 ON domain_lang');
$this->addSql('ALTER TABLE inspiration DROP is_visible');
$this->addSql('ALTER TABLE opinion DROP is_visible');
$this->addSql('ALTER TABLE outdoor_safety DROP is_visible');
$this->addSql('ALTER TABLE page DROP is_visible');
$this->addSql('ALTER TABLE route DROP is_visible, CHANGE code_name code_name VARCHAR(10) NOT NULL');
}
}