<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20221019165157 extends AbstractMigration
{
public function getDescription(): string
{
return 'Drop the unique index on job_id to facilitate OneToMany/ManyToOne relationship.';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE schedule DROP INDEX UNIQ_5A3811FBBE04EA9, ADD INDEX IDX_5A3811FBBE04EA9 (job_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE schedule DROP INDEX IDX_5A3811FBBE04EA9, ADD UNIQUE INDEX UNIQ_5A3811FBBE04EA9 (job_id)');
}
}