<?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 Version20240401094152 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$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');
$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');
$this->addSql('ALTER TABLE salary_band_scale ADD CONSTRAINT FK_4D252228565851 FOREIGN KEY (establishment_id) REFERENCES establishment (id)');
$this->addSql('ALTER TABLE tax_reduction_shedule ADD CONSTRAINT FK_8ACF33A88565851 FOREIGN KEY (establishment_id) REFERENCES establishment (id)');
$this->addSql('ALTER TABLE rh_salary_pay_slip ADD its_gross DOUBLE PRECISION DEFAULT NULL, ADD ricf DOUBLE PRECISION DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE salary_band_scale');
$this->addSql('DROP TABLE tax_reduction_shedule');
$this->addSql('ALTER TABLE rh_salary_pay_slip DROP its_gross, DROP ricf');
}
}