<?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 Version20220301163936 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// Re-order just because it can.
$this->addSql('alter table deal modify id char(36) not null comment \'(DC2Type:uuid)\' first;');
$this->addSql('alter table deal modify is_online tinyint(1) not null after is_location;');
$this->addSql('alter table deal modify coupon_code varchar(255) not null after store_id;');
$this->addSql('alter table deal modify title_sales varchar(255) not null after is_website;');
$this->addSql('alter table deal modify content longtext not null after description;');
$this->addSql('alter table deal modify is_app tinyint(1) not null after coupon_code;');
$this->addSql('alter table deal modify title varchar(255) not null after title_sales;');
$this->addSql('alter table deal modify url varchar(255) not null after title;');
$this->addSql('alter table deal modify date_start datetime null after url;');
$this->addSql('alter table deal modify date_end datetime null after date_start;');
$this->addSql('alter table deal modify updated_at datetime null after sort_order;');
$this->addSql('alter table deal modify terms longtext not null after content;');
$this->addSql('alter table deal modify allowed_days varchar(255) not null after terms;');
$this->addSql('alter table deal modify image varchar(255) not null after allowed_days;');
$this->addSql('alter table deal modify created_at datetime null after updated_at;');
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE deal ADD short_description LONGTEXT NOT NULL AFTER description, ADD image_list VARCHAR(255) NOT NULL after image');
$this->addSql('alter table deal modify sort_order int not null after image_list;');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE deal DROP short_description, DROP image_list');
}
public function isTransactional(): bool
{
return false;
}
}