<?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 Version20250619113649 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 bus_stop (id UUID NOT NULL, application_id UUID DEFAULT NULL, road_number VARCHAR(255) DEFAULT NULL, stop_name VARCHAR(255) DEFAULT NULL, road_side VARCHAR(1) DEFAULT NULL, stop_number VARCHAR(255) DEFAULT NULL, location VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_E65B69FC3E030ACD ON bus_stop (application_id)');
$this->addSql('COMMENT ON COLUMN bus_stop.id IS \'(DC2Type:uuid)\'');
$this->addSql('COMMENT ON COLUMN bus_stop.application_id IS \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE bus_stop ADD CONSTRAINT FK_E65B69FC3E030ACD FOREIGN KEY (application_id) REFERENCES application (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE bus_stop DROP CONSTRAINT FK_E65B69FC3E030ACD');
$this->addSql('DROP TABLE bus_stop');
}
}