<?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 Version20250703214656 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('ALTER TABLE transport_call_sheet DROP FOREIGN KEY FK_829D84104758967C');
$this->addSql('ALTER TABLE transport_call_sheet DROP FOREIGN KEY FK_829D8410CDF7E6B1');
$this->addSql('DROP INDEX IDX_829D84104758967C ON transport_call_sheet');
$this->addSql('DROP INDEX IDX_829D8410CDF7E6B1 ON transport_call_sheet');
$this->addSql('ALTER TABLE transport_call_sheet ADD transport_zone_id INT NOT NULL, ADD type VARCHAR(60) DEFAULT NULL, DROP transport_zone_check_point_id, DROP rh_salary_id');
$this->addSql('ALTER TABLE transport_call_sheet ADD CONSTRAINT FK_829D8410BFBFF5A FOREIGN KEY (transport_zone_id) REFERENCES transport_zone (id)');
$this->addSql('CREATE INDEX IDX_829D8410BFBFF5A ON transport_call_sheet (transport_zone_id)');
$this->addSql('ALTER TABLE transport_call_sheet_line ADD registration_transport_checkpoint_id INT NOT NULL, ADD transport_zone_check_point_id INT NOT NULL, ADD call_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', ADD morning_schedule VARCHAR(30) DEFAULT NULL, ADD evening_schedule VARCHAR(30) DEFAULT NULL');
$this->addSql('ALTER TABLE transport_call_sheet_line ADD CONSTRAINT FK_7294A369EB9EB478 FOREIGN KEY (registration_transport_checkpoint_id) REFERENCES registration_transport_checkpoint (id)');
$this->addSql('ALTER TABLE transport_call_sheet_line ADD CONSTRAINT FK_7294A369CDF7E6B1 FOREIGN KEY (transport_zone_check_point_id) REFERENCES transport_zone_check_point (id)');
$this->addSql('CREATE INDEX IDX_7294A369EB9EB478 ON transport_call_sheet_line (registration_transport_checkpoint_id)');
$this->addSql('CREATE INDEX IDX_7294A369CDF7E6B1 ON transport_call_sheet_line (transport_zone_check_point_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE transport_call_sheet DROP FOREIGN KEY FK_829D8410BFBFF5A');
$this->addSql('DROP INDEX IDX_829D8410BFBFF5A ON transport_call_sheet');
$this->addSql('ALTER TABLE transport_call_sheet ADD rh_salary_id INT NOT NULL, DROP type, CHANGE transport_zone_id transport_zone_check_point_id INT NOT NULL');
$this->addSql('ALTER TABLE transport_call_sheet ADD CONSTRAINT FK_829D84104758967C FOREIGN KEY (rh_salary_id) REFERENCES rh_salary (id)');
$this->addSql('ALTER TABLE transport_call_sheet ADD CONSTRAINT FK_829D8410CDF7E6B1 FOREIGN KEY (transport_zone_check_point_id) REFERENCES transport_zone_check_point (id)');
$this->addSql('CREATE INDEX IDX_829D84104758967C ON transport_call_sheet (rh_salary_id)');
$this->addSql('CREATE INDEX IDX_829D8410CDF7E6B1 ON transport_call_sheet (transport_zone_check_point_id)');
$this->addSql('ALTER TABLE transport_call_sheet_line DROP FOREIGN KEY FK_7294A369EB9EB478');
$this->addSql('ALTER TABLE transport_call_sheet_line DROP FOREIGN KEY FK_7294A369CDF7E6B1');
$this->addSql('DROP INDEX IDX_7294A369EB9EB478 ON transport_call_sheet_line');
$this->addSql('DROP INDEX IDX_7294A369CDF7E6B1 ON transport_call_sheet_line');
$this->addSql('ALTER TABLE transport_call_sheet_line DROP registration_transport_checkpoint_id, DROP transport_zone_check_point_id, DROP call_at, DROP morning_schedule, DROP evening_schedule');
}
}