migrations/Version20240814085521.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20240814085521 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $this->addSql('DROP INDEX uniq_a85f8e362832eb1c8dc2a8571b9bc8da');
  18.         $this->addSql('ALTER TABLE v2_income_employee ALTER ref_type SET NOT NULL');
  19.         $this->addSql('ALTER TABLE v2_income_employee ALTER value SET NOT NULL');
  20.         $this->addSql('ALTER TABLE v2_income_employee ALTER created_at SET NOT NULL');
  21.         $this->addSql('CREATE UNIQUE INDEX UNIQ_A85F8E362832EB1C8DC2A8571B9BC8DA9BAD16AE ON v2_income_employee (reporting_period_id, ins_recipient_id, ins_source_id, ref_type)');
  22.     }
  23.     public function down(Schema $schema): void
  24.     {
  25.         $this->addSql('DROP INDEX UNIQ_A85F8E362832EB1C8DC2A8571B9BC8DA9BAD16AE');
  26.         $this->addSql('ALTER TABLE v2_income_employee ALTER ref_type DROP NOT NULL');
  27.         $this->addSql('ALTER TABLE v2_income_employee ALTER value DROP NOT NULL');
  28.         $this->addSql('ALTER TABLE v2_income_employee ALTER created_at DROP NOT NULL');
  29.         $this->addSql('CREATE UNIQUE INDEX uniq_a85f8e362832eb1c8dc2a8571b9bc8da ON v2_income_employee (reporting_period_id, ins_recipient_id, ins_source_id)');
  30.     }
  31. }