migrations/Version20240911121749.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 Version20240911121749 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_49bc9556f01a3f032832eb1c');
  18.         $this->addSql('CREATE UNIQUE INDEX UNIQ_49BC9556F01A3F032832EB1C6F7B263A ON v2_wage (ins_user_id, reporting_period_id, wage_type)');
  19.         $this->addSql('DROP INDEX uniq_8a64f85c9e15d6a604ef57a');
  20.         $this->addSql('ALTER TABLE v2_wage_parts ADD ref_type VARCHAR(20) DEFAULT NULL');
  21.         $this->addSql('CREATE UNIQUE INDEX UNIQ_8A64F85C9E15D6A1B9BC8DA9BAD16AE ON v2_wage_parts (wage_id, ins_source_id, ref_type)');
  22.     }
  23.     public function down(Schema $schema): void
  24.     {
  25.         $this->addSql('DROP INDEX UNIQ_8A64F85C9E15D6A1B9BC8DA9BAD16AE');
  26.         $this->addSql('ALTER TABLE v2_wage_parts DROP ref_type');
  27.         $this->addSql('CREATE UNIQUE INDEX uniq_8a64f85c9e15d6a604ef57a ON v2_wage_parts (wage_id, ins_source_id)');
  28.         $this->addSql('DROP INDEX UNIQ_49BC9556F01A3F032832EB1C6F7B263A');
  29.         $this->addSql('CREATE UNIQUE INDEX uniq_49bc9556f01a3f032832eb1c ON v2_wage (ins_user_id, reporting_period_id)');
  30.     }
  31. }