<?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 Version20190513143100 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('DROP TABLE training_session_detail');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE training_session_detail (id INT AUTO_INCREMENT NOT NULL, training_session_id INT NOT NULL, `order` INT NOT NULL, um_type VARCHAR(255) DEFAULT NULL COLLATE utf8mb4_unicode_ci COMMENT \'(DC2Type:um_type)\', value INT NOT NULL, create_user VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci, creation_date DATETIME NOT NULL, modified_user VARCHAR(50) DEFAULT NULL COLLATE utf8mb4_unicode_ci, modified_date DATETIME DEFAULT NULL, INDEX IDX_C61B7F77DB8156B9 (training_session_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE training_session_detail ADD CONSTRAINT FK_C61B7F77DB8156B9 FOREIGN KEY (training_session_id) REFERENCES training_session (id)');
}
}