feat : Ajout du système de RTT sur la page employé avec le repport annuel des heures
All checks were successful
Auto Tag Develop / tag (push) Successful in 6s
All checks were successful
Auto Tag Develop / tag (push) Successful in 6s
This commit is contained in:
54
migrations/Version20260313080007.php
Normal file
54
migrations/Version20260313080007.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
final class Version20260313080007 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'RTT redesign: split opening_minutes and minutes+rate into 4 fields (base25, bonus25, base50, bonus50)';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// employee_rtt_balances: replace opening_minutes with 4 fields
|
||||
$this->addSql('ALTER TABLE employee_rtt_balances ADD opening_base25_minutes INT DEFAULT 0 NOT NULL');
|
||||
$this->addSql('ALTER TABLE employee_rtt_balances ADD opening_bonus25_minutes INT DEFAULT 0 NOT NULL');
|
||||
$this->addSql('ALTER TABLE employee_rtt_balances ADD opening_base50_minutes INT DEFAULT 0 NOT NULL');
|
||||
$this->addSql('ALTER TABLE employee_rtt_balances ADD opening_bonus50_minutes INT DEFAULT 0 NOT NULL');
|
||||
$this->addSql('ALTER TABLE employee_rtt_balances DROP opening_minutes');
|
||||
|
||||
// employee_rtt_payments: replace minutes+rate with 4 fields
|
||||
$this->addSql('DROP INDEX IF EXISTS uniq_rtt_payment_employee_year_month_rate');
|
||||
$this->addSql('ALTER TABLE employee_rtt_payments ADD base25_minutes INT DEFAULT 0 NOT NULL');
|
||||
$this->addSql('ALTER TABLE employee_rtt_payments ADD bonus25_minutes INT DEFAULT 0 NOT NULL');
|
||||
$this->addSql('ALTER TABLE employee_rtt_payments ADD base50_minutes INT DEFAULT 0 NOT NULL');
|
||||
$this->addSql('ALTER TABLE employee_rtt_payments ADD bonus50_minutes INT DEFAULT 0 NOT NULL');
|
||||
$this->addSql('ALTER TABLE employee_rtt_payments DROP minutes');
|
||||
$this->addSql('ALTER TABLE employee_rtt_payments DROP rate');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// employee_rtt_balances: restore opening_minutes
|
||||
$this->addSql('ALTER TABLE employee_rtt_balances ADD opening_minutes INT NOT NULL DEFAULT 0');
|
||||
$this->addSql('ALTER TABLE employee_rtt_balances DROP opening_base25_minutes');
|
||||
$this->addSql('ALTER TABLE employee_rtt_balances DROP opening_bonus25_minutes');
|
||||
$this->addSql('ALTER TABLE employee_rtt_balances DROP opening_base50_minutes');
|
||||
$this->addSql('ALTER TABLE employee_rtt_balances DROP opening_bonus50_minutes');
|
||||
|
||||
// employee_rtt_payments: restore minutes+rate
|
||||
$this->addSql('ALTER TABLE employee_rtt_payments ADD minutes INT NOT NULL DEFAULT 0');
|
||||
$this->addSql("ALTER TABLE employee_rtt_payments ADD rate VARCHAR(10) NOT NULL DEFAULT '25'");
|
||||
$this->addSql('ALTER TABLE employee_rtt_payments DROP base25_minutes');
|
||||
$this->addSql('ALTER TABLE employee_rtt_payments DROP bonus25_minutes');
|
||||
$this->addSql('ALTER TABLE employee_rtt_payments DROP base50_minutes');
|
||||
$this->addSql('ALTER TABLE employee_rtt_payments DROP bonus50_minutes');
|
||||
$this->addSql('CREATE UNIQUE INDEX uniq_rtt_payment_employee_year_month_rate ON employee_rtt_payments (employee_id, year, month, rate)');
|
||||
}
|
||||
}
|
||||
26
migrations/Version20260313092249.php
Normal file
26
migrations/Version20260313092249.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
final class Version20260313092249 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Add month column to employee_rtt_balances for flexible carry-over positioning';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE employee_rtt_balances ADD month INT DEFAULT 5 NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE employee_rtt_balances DROP month');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user