<?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 Version20220114071702 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 competition (id INT AUTO_INCREMENT NOT NULL, city_id INT DEFAULT NULL, title VARCHAR(255) NOT NULL, hall VARCHAR(255) DEFAULT NULL, date DATE NOT NULL, checkin DATE DEFAULT NULL, checkout DATE DEFAULT NULL, deadline DATETIME DEFAULT NULL, timezone INT DEFAULT NULL, INDEX IDX_B50A2CB18BAC62AF (city_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE competition ADD CONSTRAINT FK_B50A2CB18BAC62AF FOREIGN KEY (city_id) REFERENCES city (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE competition');
}
}