Maj Phase 2 - Institutions financières

This commit is contained in:
ocroguennec committed 2026-09-26 18:28:15 +02:00
1 parent 1dcb33aa74
commit b18ffc63ee
18 files changed
+383 -16

No files matched your search

+12
View File
@@ -3657,4 +3657,16 @@ db.exec(`
}
}
// ── Migration : institution_id sur comptes (Phase 2, demande Olivier 26/09/26) ────────────
// Rattache un compte au référentiel institutions_referentiel — nullable, non-destructif :
// le champ banque (texte libre) reste en base tel quel pour les comptes non encore réconciliés
// (cf. plan de déploiement, doc projet claude/plan_referentiel_institutions_financieres.md).
{
const cols = db.prepare('PRAGMA table_info(comptes)').all().map(c => c.name);
if (!cols.includes('institution_id')) {
db.exec('ALTER TABLE comptes ADD COLUMN institution_id INTEGER REFERENCES institutions_referentiel(id) ON DELETE SET NULL');
}
}
export default db;