<?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 Version20240123141806 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE v2_custom_user_percent RENAME TO v2_user_percent');
$this->addSql('ALTER TABLE v2_user_percent ADD COLUMN is_custom BOOLEAN NOT NULL DEFAULT false');
$this->addSql('UPDATE v2_user_percent SET is_custom = true');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE v2_user_percent RENAME TO v2_custom_user_percent');
$this->addSql('ALTER TABLE v2_custom_user_percent DROP COLUMN is_custom');
}
}