migrations/Version20240401094152.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 Version20240401094152 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('CREATE TABLE salary_band_scale (id INT AUTO_INCREMENT NOT NULL, establishment_id INT NOT NULL, num_order INT NOT NULL, lower_bound DOUBLE PRECISION DEFAULT NULL, upper_bound DOUBLE PRECISION DEFAULT NULL, rate DOUBLE PRECISION DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_by INT NOT NULL, updated_by INT NOT NULL, INDEX IDX_4D252228565851 (establishment_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('CREATE TABLE tax_reduction_shedule (id INT AUTO_INCREMENT NOT NULL, establishment_id INT NOT NULL, number_of_shares DOUBLE PRECISION NOT NULL, monthly_tax_reduction DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_by INT NOT NULL, updated_by INT NOT NULL, INDEX IDX_8ACF33A88565851 (establishment_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  20.         $this->addSql('ALTER TABLE salary_band_scale ADD CONSTRAINT FK_4D252228565851 FOREIGN KEY (establishment_id) REFERENCES establishment (id)');
  21.         $this->addSql('ALTER TABLE tax_reduction_shedule ADD CONSTRAINT FK_8ACF33A88565851 FOREIGN KEY (establishment_id) REFERENCES establishment (id)');
  22.         $this->addSql('ALTER TABLE rh_salary_pay_slip ADD its_gross DOUBLE PRECISION DEFAULT NULL, ADD ricf DOUBLE PRECISION DEFAULT NULL');
  23.     }
  24.     public function down(Schema $schema): void
  25.     {
  26.         // this down() migration is auto-generated, please modify it to your needs
  27.         $this->addSql('DROP TABLE salary_band_scale');
  28.         $this->addSql('DROP TABLE tax_reduction_shedule');
  29.         $this->addSql('ALTER TABLE rh_salary_pay_slip DROP its_gross, DROP ricf');
  30.     }
  31. }