<?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 Version20240814085521 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql('DROP INDEX uniq_a85f8e362832eb1c8dc2a8571b9bc8da');
$this->addSql('ALTER TABLE v2_income_employee ALTER ref_type SET NOT NULL');
$this->addSql('ALTER TABLE v2_income_employee ALTER value SET NOT NULL');
$this->addSql('ALTER TABLE v2_income_employee ALTER created_at SET NOT NULL');
$this->addSql('CREATE UNIQUE INDEX UNIQ_A85F8E362832EB1C8DC2A8571B9BC8DA9BAD16AE ON v2_income_employee (reporting_period_id, ins_recipient_id, ins_source_id, ref_type)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP INDEX UNIQ_A85F8E362832EB1C8DC2A8571B9BC8DA9BAD16AE');
$this->addSql('ALTER TABLE v2_income_employee ALTER ref_type DROP NOT NULL');
$this->addSql('ALTER TABLE v2_income_employee ALTER value DROP NOT NULL');
$this->addSql('ALTER TABLE v2_income_employee ALTER created_at DROP NOT NULL');
$this->addSql('CREATE UNIQUE INDEX uniq_a85f8e362832eb1c8dc2a8571b9bc8da ON v2_income_employee (reporting_period_id, ins_recipient_id, ins_source_id)');
}
}