<?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 Version20210809155820 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('ALTER TABLE allowed_validation CHANGE accent accent VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE allowed_validation ADD CONSTRAINT FK_A8E06BD76761D2EB FOREIGN KEY (accent) REFERENCES accent (id)');
$this->addSql('CREATE INDEX IDX_A8E06BD76761D2EB ON allowed_validation (accent)');
$this->addSql('ALTER TABLE project ADD max_record_number INT DEFAULT 0 NOT NULL, ADD soft_limit TINYINT(1) NOT NULL, CHANGE subscriptionactive subscription_active TINYINT(1) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE allowed_validation DROP FOREIGN KEY FK_A8E06BD76761D2EB');
$this->addSql('DROP INDEX IDX_A8E06BD76761D2EB ON allowed_validation');
$this->addSql('ALTER TABLE allowed_validation CHANGE accent accent VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE project ADD subscriptionActive TINYINT(1) NOT NULL, DROP subscription_active, DROP max_record_number, DROP soft_limit');
}
}