<?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 Version20201222103632 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('ALTER TABLE coupon_builder ADD `start_date_type` VARCHAR(255) NOT NULL COMMENT \'(DC2Type:start_date_type)\', ADD `day_start_date` INT DEFAULT NULL, ADD `end_date_type` VARCHAR(255) NULL DEFAULT NULL COMMENT \'(DC2Type:end_date_type)\', ADD `day_end_date` INT DEFAULT NULL');
$this->addSql('UPDATE coupon_builder SET `start_date_type` = \'fixed\' ');
$this->addSql('UPDATE coupon_builder SET `end_date_type` = \'fixed\' ');
}
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('ALTER TABLE coupon_builder DROP `start_date_type`, DROP `day_start_date`, DROP `end_date_type`, DROP `day_end_date`');
}
}