Finalisation réception marchandise, ajout de composant UI et ajout de fixtures (!7)
All checks were successful
Auto Tag Develop / tag (push) Successful in 5s
Build Release Artefact / build (push) Successful in 1m15s

| Numéro du ticket | Titre du ticket |
|------------------|-----------------|
|                  |                 |

## Description de la PR

## Modification du .env

## Check list

- [x] Pas de régression
- [ ] TU/TI/TF rédigée
- [x] TU/TI/TF OK
- [x] CHANGELOG modifié

Reviewed-on: #7
Co-authored-by: tristan <tristan@yuno.malio.fr>
Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #7.
This commit is contained in:
2026-01-30 14:10:40 +00:00
committed by Autin
parent 9ae073e69e
commit 1ce6357c1d
90 changed files with 4280 additions and 307 deletions

View File

@@ -0,0 +1,51 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260127000600 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add carriers, drivers, vehicles and link receptions to carriers/drivers';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE carrier (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, name VARCHAR(180) NOT NULL, code VARCHAR(30) DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE driver (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, carrier_id INT NOT NULL, name VARCHAR(180) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_14B3BC5F4C3C5E0A ON driver (carrier_id)');
$this->addSql('ALTER TABLE driver ADD CONSTRAINT FK_14B3BC5F4C3C5E0A FOREIGN KEY (carrier_id) REFERENCES carrier (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE TABLE vehicle (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, carrier_id INT NOT NULL, truck_id INT NOT NULL, plate VARCHAR(20) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_1B80E4864C3C5E0A ON vehicle (carrier_id)');
$this->addSql('CREATE INDEX IDX_1B80E4868BEBB4B ON vehicle (truck_id)');
$this->addSql('ALTER TABLE vehicle ADD CONSTRAINT FK_1B80E4864C3C5E0A FOREIGN KEY (carrier_id) REFERENCES carrier (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE vehicle ADD CONSTRAINT FK_1B80E4868BEBB4B FOREIGN KEY (truck_id) REFERENCES truck (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE reception ADD carrier_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE reception ADD driver_id INT DEFAULT NULL');
$this->addSql('CREATE INDEX IDX_83DC02E34C3C5E0A ON reception (carrier_id)');
$this->addSql('CREATE INDEX IDX_83DC02E3F24C741B ON reception (driver_id)');
$this->addSql('ALTER TABLE reception ADD CONSTRAINT FK_83DC02E34C3C5E0A FOREIGN KEY (carrier_id) REFERENCES carrier (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE reception ADD CONSTRAINT FK_83DC02E3F24C741B FOREIGN KEY (driver_id) REFERENCES driver (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE reception DROP CONSTRAINT FK_83DC02E34C3C5E0A');
$this->addSql('ALTER TABLE reception DROP CONSTRAINT FK_83DC02E3F24C741B');
$this->addSql('DROP INDEX IDX_83DC02E34C3C5E0A');
$this->addSql('DROP INDEX IDX_83DC02E3F24C741B');
$this->addSql('ALTER TABLE reception DROP carrier_id');
$this->addSql('ALTER TABLE reception DROP driver_id');
$this->addSql('ALTER TABLE vehicle DROP CONSTRAINT FK_1B80E4864C3C5E0A');
$this->addSql('ALTER TABLE vehicle DROP CONSTRAINT FK_1B80E4868BEBB4B');
$this->addSql('DROP TABLE vehicle');
$this->addSql('ALTER TABLE driver DROP CONSTRAINT FK_14B3BC5F4C3C5E0A');
$this->addSql('DROP TABLE driver');
$this->addSql('DROP TABLE carrier');
}
}