<?php
declare(strict_types=1);
namespace CrmBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20240903110340 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE crm_bundle__opportunity_state ADD closed TINYINT(1) DEFAULT 0');
$this->addSql('CREATE INDEX is_lost ON crm_bundle__opportunity_state (is_lost)');
$this->addSql('CREATE INDEX closed ON crm_bundle__opportunity_state (closed)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP INDEX is_lost ON crm_bundle__opportunity_state');
$this->addSql('DROP INDEX closed ON crm_bundle__opportunity_state');
$this->addSql('ALTER TABLE crm_bundle__opportunity_state DROP closed');
}
}