<?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 Version20220503115402 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 price ADD trip_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE price ADD CONSTRAINT FK_CAC822D9A5BC2E0E FOREIGN KEY (trip_id) REFERENCES trip (id)');
$this->addSql('CREATE INDEX IDX_CAC822D9A5BC2E0E ON price (trip_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE price DROP FOREIGN KEY FK_CAC822D9A5BC2E0E');
$this->addSql('DROP INDEX IDX_CAC822D9A5BC2E0E ON price');
$this->addSql('ALTER TABLE price DROP trip_id');
}
}