✨ feat(devis/contrat): ajoute prestataires et paiements aux devis et améliore la gestion des règlements et statuts
This commit is contained in:
31
migrations/Version20260206170000.php
Normal file
31
migrations/Version20260206170000.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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 Version20260206170000 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Add reservation_state to contrats';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql("ALTER TABLE contrats ADD reservation_state VARCHAR(50) DEFAULT 'pending' NOT NULL");
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE contrats DROP reservation_state');
|
||||
}
|
||||
}
|
||||
35
migrations/Version20260206180000.php
Normal file
35
migrations/Version20260206180000.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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 Version20260206180000 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Add relation between Prestaire and Devis';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE devis ADD prestataire_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE devis ADD CONSTRAINT FK_8B27C52BBE30DA2F7 FOREIGN KEY (prestataire_id) REFERENCES prestaire (id)');
|
||||
$this->addSql('CREATE INDEX IDX_8B27C52BBE30DA2F7 ON devis (prestataire_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE devis DROP FOREIGN KEY FK_8B27C52BBE30DA2F7');
|
||||
$this->addSql('DROP INDEX IDX_8B27C52BBE30DA2F7 ON devis');
|
||||
$this->addSql('ALTER TABLE devis DROP prestataire_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user