<?php
declare(strict_types=1);
namespace Application\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220902122618 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 legal_entity_category_questionnaire_reminder (id INT AUTO_INCREMENT NOT NULL, category INT DEFAULT NULL, entity INT DEFAULT NULL, date DATE NOT NULL COMMENT \'(DC2Type:carbondate)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:carbondatetime)\', updated_at DATETIME NOT NULL COMMENT \'(DC2Type:carbondatetime)\', INDEX IDX_DF78A20564C19C1E284468 (category, entity), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE legal_entity_category_questionnaire_reminder ADD CONSTRAINT FK_DF78A20564C19C1E284468 FOREIGN KEY (category, entity) REFERENCES uses_questionnaire (category_id, entity_id)');
$this->addSql('ALTER TABLE uses_questionnaire ADD last_confirmed DATE DEFAULT NULL COMMENT \'(DC2Type:carbondate)\', ADD confirmation_locked TINYINT(1) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE legal_entity_category_questionnaire_reminder');
$this->addSql('ALTER TABLE uses_questionnaire DROP last_confirmed, DROP confirmation_locked');
}
}