<?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 Version20220503084115 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 cancellation_parameters (id INT AUTO_INCREMENT NOT NULL, event_id INT DEFAULT NULL, limit_a INT NOT NULL, limit_b INT NOT NULL, limit_c INT NOT NULL, limit_d INT NOT NULL, amount_n DOUBLE PRECISION NOT NULL, amount_m DOUBLE PRECISION NOT NULL, UNIQUE INDEX UNIQ_F12CF77F71F7E88B (event_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE cancellation_parameters ADD CONSTRAINT FK_F12CF77F71F7E88B FOREIGN KEY (event_id) REFERENCES event (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE cancellation_parameters');
}
}