<?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 Version20221115205540 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 rh_salary_pay_slip_payment (id INT AUTO_INCREMENT NOT NULL, establishment_id INT NOT NULL, rh_salary_pay_slip_id INT NOT NULL, create_date DATE NOT NULL COMMENT \'(DC2Type:date_immutable)\', amount DOUBLE PRECISION NOT NULL, amount_rest 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, day VARCHAR(16) NOT NULL, month VARCHAR(10) NOT NULL, year VARCHAR(6) NOT NULL, INDEX IDX_AABC06268565851 (establishment_id), INDEX IDX_AABC06263C290DE6 (rh_salary_pay_slip_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE rh_salary_pay_slip_payment ADD CONSTRAINT FK_AABC06268565851 FOREIGN KEY (establishment_id) REFERENCES establishment (id)');
$this->addSql('ALTER TABLE rh_salary_pay_slip_payment ADD CONSTRAINT FK_AABC06263C290DE6 FOREIGN KEY (rh_salary_pay_slip_id) REFERENCES rh_salary_pay_slip (id)');
$this->addSql('ALTER TABLE rh_pay_slip ADD message_recipient LONGTEXT DEFAULT NULL, ADD message_header VARCHAR(255) DEFAULT NULL, ADD message LONGTEXT DEFAULT NULL, ADD message_footer LONGTEXT DEFAULT NULL, ADD message_location VARCHAR(255) DEFAULT NULL, ADD message_signatory VARCHAR(255) DEFAULT NULL, ADD message_signatory_title VARCHAR(255) DEFAULT NULL, ADD is_validated TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE rh_salary_pay_slip ADD base_salary DOUBLE PRECISION DEFAULT NULL');
$this->addSql('ALTER TABLE school_report_card ADD is_unclassified TINYINT(1) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE rh_salary_pay_slip_payment');
$this->addSql('ALTER TABLE rh_pay_slip DROP message_recipient, DROP message_header, DROP message, DROP message_footer, DROP message_location, DROP message_signatory, DROP message_signatory_title, DROP is_validated');
$this->addSql('ALTER TABLE rh_salary_pay_slip DROP base_salary');
$this->addSql('ALTER TABLE school_report_card DROP is_unclassified');
}
}