<?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 Version20220908163250 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 models CHANGE banner banner_desktop JSON NOT NULL');
$this->addSql('ALTER TABLE models ADD banner_tablet JSON NOT NULL AFTER banner_desktop');
$this->addSql('ALTER TABLE models ADD banner_mobile JSON NOT NULL AFTER banner_tablet');
$this->addSql('UPDATE models SET banner_mobile = \'[]\'');
$this->addSql('UPDATE models SET banner_tablet = \'[]\'');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE models CHANGE banner_desktop banner JSON NOT NULL');
$this->addSql('ALTER TABLE models DROP banner_tablet');
$this->addSql('ALTER TABLE models DROP banner_mobile');
}
}