<?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 Version20250708115320 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('CREATE TABLE clw_region_mapping (id INT UNSIGNED AUTO_INCREMENT NOT NULL COMMENT \'CLW Region unique identifier\', region_id INT NOT NULL, city_id INT DEFAULT NULL, is_active TINYINT(1) DEFAULT 1 NOT NULL COMMENT \'Flag that indicates if the notification type is active\', INDEX IDX_F76AAD2998260155 (region_id), INDEX IDX_F76AAD298BAC62AF (city_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE clw_region_mapping ADD CONSTRAINT FK_F76AAD2998260155 FOREIGN KEY (region_id) REFERENCES std_domains_values (id)');
$this->addSql('ALTER TABLE clw_region_mapping ADD CONSTRAINT FK_F76AAD298BAC62AF FOREIGN KEY (city_id) REFERENCES std_domains_values (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE clw_region_mapping DROP FOREIGN KEY FK_F76AAD2998260155');
$this->addSql('ALTER TABLE clw_region_mapping DROP FOREIGN KEY FK_F76AAD298BAC62AF');
$this->addSql('DROP TABLE clw_region_mapping');
}
}