<?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 Version20211025080510 extends AbstractMigration
{
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE system_settings CHANGE questionnaire_uploads uses_questionnaire_uploads TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE substance_category ADD uses_questionnaire_name VARCHAR(255) DEFAULT NULL, ADD uses_questionnaire_path VARCHAR(255) DEFAULT NULL, ADD uses_questionnaire_mime_type VARCHAR(255) DEFAULT NULL, DROP questionnaire_name, DROP questionnaire_path, DROP questionnaire_mime_type, CHANGE questionnaire_size uses_questionnaire_size INT DEFAULT NULL, CHANGE questionnaire_timestamp uses_questionnaire_timestamp DATETIME DEFAULT NULL COMMENT \'(DC2Type:carbondatetime)\'');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE substance_category ADD questionnaire_name VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD questionnaire_path VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD questionnaire_mime_type VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, DROP uses_questionnaire_name, DROP uses_questionnaire_path, DROP uses_questionnaire_mime_type, CHANGE uses_questionnaire_size questionnaire_size INT DEFAULT NULL, CHANGE uses_questionnaire_timestamp questionnaire_timestamp DATETIME DEFAULT NULL COMMENT \'(DC2Type:carbondatetime)\'');
$this->addSql('ALTER TABLE system_settings CHANGE uses_questionnaire_uploads questionnaire_uploads TINYINT(1) NOT NULL');
}
}