✨ feat(etl): Implémente le dashboard dynamique et la gestion des missions
This commit is contained in:
37
migrations/Version20260206200000.php
Normal file
37
migrations/Version20260206200000.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?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 Version20260206200000 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Add status and account relation to etat_lieux';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE etat_lieux ADD account_id INT DEFAULT NULL');
|
||||
$this->addSql("ALTER TABLE etat_lieux ADD status VARCHAR(50) DEFAULT 'delivery_progress' NOT NULL");
|
||||
$this->addSql('ALTER TABLE etat_lieux ADD CONSTRAINT FK_D71603599B6B5FBA FOREIGN KEY (account_id) REFERENCES account (id)');
|
||||
$this->addSql('CREATE INDEX IDX_D71603599B6B5FBA ON etat_lieux (account_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE etat_lieux DROP FOREIGN KEY FK_D71603599B6B5FBA');
|
||||
$this->addSql('DROP INDEX IDX_D71603599B6B5FBA ON etat_lieux');
|
||||
$this->addSql('ALTER TABLE etat_lieux DROP account_id');
|
||||
$this->addSql('ALTER TABLE etat_lieux DROP status');
|
||||
}
|
||||
}
|
||||
32
migrations/Version20260206210000.php
Normal file
32
migrations/Version20260206210000.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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 Version20260206210000 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Update default status for etat_lieux';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql("ALTER TABLE etat_lieux ALTER status SET DEFAULT 'delivery_ready'");
|
||||
$this->addSql("UPDATE etat_lieux SET status = 'delivery_ready' WHERE status = 'delivery_progress'");
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql("ALTER TABLE etat_lieux ALTER status SET DEFAULT 'delivery_progress'");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user