```
✨ feat(Devis): Ajoute options, dates début/fin et améliore affichage PDF
Ajoute les champs date de début et fin au devis. Permet l'ajout d'options au devis. Améliore l'affichage du PDF.
```
This commit is contained in:
42
migrations/Version20260122085820.php
Normal file
42
migrations/Version20260122085820.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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 Version20260122085820 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 devis ADD start_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL');
|
||||
$this->addSql('ALTER TABLE devis ADD end_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL');
|
||||
$this->addSql('COMMENT ON COLUMN devis.start_at IS \'(DC2Type:datetime_immutable)\'');
|
||||
$this->addSql('COMMENT ON COLUMN devis.end_at IS \'(DC2Type:datetime_immutable)\'');
|
||||
$this->addSql('ALTER TABLE devis_line DROP start_at');
|
||||
$this->addSql('ALTER TABLE devis_line DROP end_at');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
$this->addSql('ALTER TABLE devis DROP start_at');
|
||||
$this->addSql('ALTER TABLE devis DROP end_at');
|
||||
$this->addSql('ALTER TABLE devis_line ADD start_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL');
|
||||
$this->addSql('ALTER TABLE devis_line ADD end_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL');
|
||||
$this->addSql('COMMENT ON COLUMN devis_line.start_at IS \'(DC2Type:datetime_immutable)\'');
|
||||
$this->addSql('COMMENT ON COLUMN devis_line.end_at IS \'(DC2Type:datetime_immutable)\'');
|
||||
}
|
||||
}
|
||||
36
migrations/Version20260122092253.php
Normal file
36
migrations/Version20260122092253.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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 Version20260122092253 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 devis DROP CONSTRAINT fk_8b27c52b3adb05f1');
|
||||
$this->addSql('DROP INDEX idx_8b27c52b3adb05f1');
|
||||
$this->addSql('ALTER TABLE devis DROP options_id');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
$this->addSql('ALTER TABLE devis ADD options_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE devis ADD CONSTRAINT fk_8b27c52b3adb05f1 FOREIGN KEY (options_id) REFERENCES options (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('CREATE INDEX idx_8b27c52b3adb05f1 ON devis (options_id)');
|
||||
}
|
||||
}
|
||||
36
migrations/Version20260122092321.php
Normal file
36
migrations/Version20260122092321.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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 Version20260122092321 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 options ADD devis_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE options ADD CONSTRAINT FK_D035FA8741DEFADA FOREIGN KEY (devis_id) REFERENCES devis (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('CREATE INDEX IDX_D035FA8741DEFADA ON options (devis_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
$this->addSql('ALTER TABLE options DROP CONSTRAINT FK_D035FA8741DEFADA');
|
||||
$this->addSql('DROP INDEX IDX_D035FA8741DEFADA');
|
||||
$this->addSql('ALTER TABLE options DROP devis_id');
|
||||
}
|
||||
}
|
||||
36
migrations/Version20260122092540.php
Normal file
36
migrations/Version20260122092540.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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 Version20260122092540 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 options DROP CONSTRAINT fk_d035fa8741defada');
|
||||
$this->addSql('DROP INDEX idx_d035fa8741defada');
|
||||
$this->addSql('ALTER TABLE options DROP devis_id');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
$this->addSql('ALTER TABLE options ADD devis_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE options ADD CONSTRAINT fk_d035fa8741defada FOREIGN KEY (devis_id) REFERENCES devis (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('CREATE INDEX idx_d035fa8741defada ON options (devis_id)');
|
||||
}
|
||||
}
|
||||
38
migrations/Version20260122092618.php
Normal file
38
migrations/Version20260122092618.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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 Version20260122092618 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 devis_options (id SERIAL NOT NULL, devis_id INT DEFAULT NULL, option_id INT DEFAULT NULL, price_ht DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE INDEX IDX_42DB61DB41DEFADA ON devis_options (devis_id)');
|
||||
$this->addSql('CREATE INDEX IDX_42DB61DBA7C41D6F ON devis_options (option_id)');
|
||||
$this->addSql('ALTER TABLE devis_options ADD CONSTRAINT FK_42DB61DB41DEFADA FOREIGN KEY (devis_id) REFERENCES devis (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE devis_options ADD CONSTRAINT FK_42DB61DBA7C41D6F FOREIGN KEY (option_id) REFERENCES options (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
$this->addSql('ALTER TABLE devis_options DROP CONSTRAINT FK_42DB61DB41DEFADA');
|
||||
$this->addSql('ALTER TABLE devis_options DROP CONSTRAINT FK_42DB61DBA7C41D6F');
|
||||
$this->addSql('DROP TABLE devis_options');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user