<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20230814195206 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE type (id INT AUTO_INCREMENT NOT NULL, country_id INT DEFAULT NULL, type VARCHAR(255) DEFAULT NULL, INDEX IDX_8CDE5729F92F3E70 (country_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE type ADD CONSTRAINT FK_8CDE5729F92F3E70 FOREIGN KEY (country_id) REFERENCES country (id)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE type');
}
}