<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Migracja tworząca tabelę słownika dróg (dict_road) - Redmine #29872
*/
final class Version20260903072910 extends AbstractMigration
{
public function getDescription(): string
{
return 'Create dict_road table (roads dictionary synced from SmartGEM)';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE dict_road (id UUID NOT NULL, external_id VARCHAR(50) NOT NULL, road_number VARCHAR(50) NOT NULL, road_name VARCHAR(255) DEFAULT NULL, is_active BOOLEAN DEFAULT true NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_C08258E9F75D7B0 ON dict_road (external_id)');
$this->addSql('COMMENT ON COLUMN dict_road.id IS \'(DC2Type:uuid)\'');
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE dict_road');
}
}