<?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 Version20220624151042 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 affiliated_event_application (id INT AUTO_INCREMENT NOT NULL, event_id INT NOT NULL, specialist_id INT NOT NULL, status VARCHAR(255) DEFAULT NULL, reason_to_company LONGTEXT DEFAULT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, INDEX IDX_3C6B632D71F7E88B (event_id), INDEX IDX_3C6B632D7B100C1A (specialist_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE affiliated_event_application ADD CONSTRAINT FK_3C6B632D71F7E88B FOREIGN KEY (event_id) REFERENCES event (id)');
$this->addSql('ALTER TABLE affiliated_event_application ADD CONSTRAINT FK_3C6B632D7B100C1A FOREIGN KEY (specialist_id) REFERENCES specialist (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE affiliated_event_application');
}
}