<?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 Version20211118083226 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('CREATE TEMPORARY TABLE __temp__shop_example AS SELECT id, link, title, pos, image, updated_at FROM shop_example');
$this->addSql('DROP TABLE shop_example');
$this->addSql('CREATE TABLE shop_example (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, link VARCHAR(255) NOT NULL COLLATE BINARY, title VARCHAR(255) NOT NULL COLLATE BINARY, pos INTEGER NOT NULL, image VARCHAR(255) DEFAULT NULL COLLATE BINARY, updated_at DATETIME DEFAULT NULL --(DC2Type:datetime_immutable)
)');
$this->addSql('INSERT INTO shop_example (id, link, title, pos, image, updated_at) SELECT id, link, title, pos, image, updated_at FROM __temp__shop_example');
$this->addSql('DROP TABLE __temp__shop_example');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE shop_example ADD COLUMN description CLOB DEFAULT NULL COLLATE BINARY');
}
}