<?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 Version20220428140540 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 timing (id INT AUTO_INCREMENT NOT NULL, address_id INT NOT NULL, addresses_list_id INT NOT NULL, time INT DEFAULT NULL, transport_mode INT NOT NULL, details VARCHAR(2000) NOT NULL, engine VARCHAR(20) DEFAULT NULL, status INT DEFAULT NULL, INDEX IDX_13B196EBF5B7AF75 (address_id), INDEX IDX_13B196EBE673ED98 (addresses_list_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE timing ADD CONSTRAINT FK_13B196EBF5B7AF75 FOREIGN KEY (address_id) REFERENCES addresse (id)');
$this->addSql('ALTER TABLE timing ADD CONSTRAINT FK_13B196EBE673ED98 FOREIGN KEY (addresses_list_id) REFERENCES addresses_list (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE timing');
}
}