migrations/Version20260203175346.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20260203175346 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return 'table for bus stops dictionary';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('CREATE TABLE dict_bus_stop (id UUID NOT NULL, external_id VARCHAR(50) NOT NULL, road_id VARCHAR(50) DEFAULT NULL, road_no VARCHAR(50) NOT NULL, road_name VARCHAR(255) DEFAULT NULL, road_side VARCHAR(10) DEFAULT NULL, from_mileage INT DEFAULT NULL, stop_number VARCHAR(50) DEFAULT NULL, stop_name VARCHAR(255) DEFAULT NULL, is_active BOOLEAN DEFAULT true NOT NULL, PRIMARY KEY(id))');
  19.         $this->addSql('CREATE UNIQUE INDEX UNIQ_6CC34D3A9F75D7B0 ON dict_bus_stop (external_id)');
  20.         $this->addSql('COMMENT ON COLUMN dict_bus_stop.id IS \'(DC2Type:uuid)\'');
  21.     }
  22.     public function down(Schema $schema): void
  23.     {
  24.         // this down() migration is auto-generated, please modify it to your needs
  25.         $this->addSql('CREATE SCHEMA public');
  26.         $this->addSql('DROP TABLE dict_bus_stop');
  27.     }
  28. }