<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20241212104829 extends AbstractMigration
{
public function getDescription(): string
{
return 'Change coupon';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE coupon DROP usage_count, CHANGE valid_from valid_from DATETIME DEFAULT NULL, CHANGE valid_to valid_to DATETIME DEFAULT NULL, CHANGE usage_limit usage_limit INT DEFAULT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE coupon ADD usage_count INT NOT NULL, CHANGE valid_from valid_from DATETIME NOT NULL, CHANGE valid_to valid_to DATETIME NOT NULL, CHANGE usage_limit usage_limit INT NOT NULL');
}
}