feat(Customer): Crée espace client, ajoute relation compte, envoie email.

This commit is contained in:
Serreau Jovann
2025-10-09 13:28:09 +02:00
parent 1931ae08e5
commit d996d3beaf
8 changed files with 187 additions and 3 deletions

View 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 Version20251009110742 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 customer ADD account_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE customer ADD CONSTRAINT FK_81398E099B6B5FBA FOREIGN KEY (account_id) REFERENCES "account" (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_81398E099B6B5FBA ON customer (account_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 customer DROP CONSTRAINT FK_81398E099B6B5FBA');
$this->addSql('DROP INDEX IDX_81398E099B6B5FBA');
$this->addSql('ALTER TABLE customer DROP account_id');
}
}