feat(SepaController): Ajoute la fonctionnalité de mandat SEPA pour les clients.

This commit is contained in:
Serreau Jovann
2025-10-12 17:27:11 +02:00
parent 3b91fbd807
commit e2ba005d03
8 changed files with 270 additions and 0 deletions

View 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 Version20251012151847 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 customer_sepa (id SERIAL NOT NULL, customer_id INT DEFAULT NULL, iban VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_57C955EA9395C3F3 ON customer_sepa (customer_id)');
$this->addSql('ALTER TABLE customer_sepa ADD CONSTRAINT FK_57C955EA9395C3F3 FOREIGN KEY (customer_id) REFERENCES customer (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 customer_sepa DROP CONSTRAINT FK_57C955EA9395C3F3');
$this->addSql('DROP TABLE customer_sepa');
}
}