<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20240101000000AddIsPdiJobToJob extends AbstractMigration
{
public function getDescription(): string
{
return 'Add is_pdi_job boolean column to job table';
}
public function up(Schema $schema): void
{
$table = $schema->getTable('job');
if (!$table->hasColumn('is_pdi_job')) {
$this->addSql('ALTER TABLE job ADD is_pdi_job TINYINT(1) NOT NULL DEFAULT 0');
}
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE job DROP COLUMN is_pdi_job');
}
}