<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Migration: Add is_loyal column to Contact table
*
* This migration adds the missing is_loyal column that is required
* for the Contact entity before running the privatisation data migration.
*/
final class Version20250707125644 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add is_loyal column to Contact table';
}
public function up(Schema $schema): void
{
// Add is_loyal column to contact table
$this->addSql('ALTER TABLE contact ADD is_loyal TINYINT(1) DEFAULT 0 NOT NULL');
}
public function down(Schema $schema): void
{
// Remove is_loyal column
$this->addSql('ALTER TABLE contact DROP is_loyal');
}
}