migrations/Version20221115205540.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 Version20221115205540 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 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');
  19.         $this->addSql('ALTER TABLE rh_salary_pay_slip_payment ADD CONSTRAINT FK_AABC06268565851 FOREIGN KEY (establishment_id) REFERENCES establishment (id)');
  20.         $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)');
  21.         $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');
  22.         $this->addSql('ALTER TABLE rh_salary_pay_slip ADD base_salary DOUBLE PRECISION DEFAULT NULL');
  23.         $this->addSql('ALTER TABLE school_report_card ADD is_unclassified TINYINT(1) NOT NULL');
  24.     }
  25.     public function down(Schema $schema): void
  26.     {
  27.         // this down() migration is auto-generated, please modify it to your needs
  28.         $this->addSql('DROP TABLE rh_salary_pay_slip_payment');
  29.         $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');
  30.         $this->addSql('ALTER TABLE rh_salary_pay_slip DROP base_salary');
  31.         $this->addSql('ALTER TABLE school_report_card DROP is_unclassified');
  32.     }
  33. }