<?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 Version20220627144437 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 resource_nda_status (id INT AUTO_INCREMENT NOT NULL, resource_id INT DEFAULT NULL, nda_file_id INT DEFAULT NULL, status TINYINT(1) NOT NULL, INDEX IDX_4E2D365F89329D25 (resource_id), INDEX IDX_4E2D365F78907A47 (nda_file_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE resource_nda_status ADD CONSTRAINT FK_4E2D365F89329D25 FOREIGN KEY (resource_id) REFERENCES resource (id)');
$this->addSql('ALTER TABLE resource_nda_status ADD CONSTRAINT FK_4E2D365F78907A47 FOREIGN KEY (nda_file_id) REFERENCES nda_file (id)');
$this->addSql('DROP TABLE resources_ndafile_signatory');
$this->addSql('ALTER TABLE scenario_project CHANGE max_scenario_duration max_scenario_duration NUMERIC(10, 2) DEFAULT \'0\' NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE resources_ndafile_signatory (resources_id INT NOT NULL, nda_file_id INT NOT NULL, isAccepted INT NOT NULL, INDEX IDX_71B05CB578907A47 (nda_file_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('DROP TABLE resource_nda_status');
$this->addSql('ALTER TABLE scenario_project CHANGE max_scenario_duration max_scenario_duration NUMERIC(10, 2) DEFAULT \'0.00\' NOT NULL');
}
}