# Rapport d'Audit - Migrations Flyway vs Entités JPA
Date: 2026-03-16 01:18:05

## Résumé
- **Entités JPA**: 71
- **Tables dans migrations**: 76

---

## 1. Entités JPA et leurs tables

| Entité | Table attendue | Existe? | Migration(s) |
|--------|----------------|---------|--------------|
| Adresse | `adresses` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| CampagneAgricole | `campagnes_agricoles` | ✅ | V2__Entity_Schema_Alignment.sql |
| AlertConfiguration | `alert_configuration` | ✅ | V7__Monitoring_System.sql |
| AlerteLcbFt | `alertes_lcb_ft` | ✅ | V9__Create_Alertes_LCB_FT.sql |
| ApproverAction | `approver_actions` | ✅ | V6__Create_Finance_Workflow_Tables.sql |
| AuditLog | `audit_logs` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| AyantDroit | `ayants_droit` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| **BaseEntity** | `base_entity` | **❌ MANQUANT** | - |
| Budget | `budgets` | ✅ | V6__Create_Finance_Workflow_Tables.sql |
| BudgetLine | `budget_lines` | ✅ | V6__Create_Finance_Workflow_Tables.sql |
| CampagneCollecte | `campagnes_collecte` | ✅ | V2__Entity_Schema_Alignment.sql |
| ContributionCollecte | `contributions_collecte` | ✅ | V2__Entity_Schema_Alignment.sql |
| **CompteComptable** | `compte_comptable` | **❌ MANQUANT** | - |
| CompteWave | `comptes_wave` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| **Configuration** | `configuration` | **❌ MANQUANT** | - |
| **ConfigurationWave** | `configuration_wave` | **❌ MANQUANT** | - |
| Cotisation | `cotisations` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| DonReligieux | `dons_religieux` | ✅ | V2__Entity_Schema_Alignment.sql |
| **DemandeAdhesion** | `demande_adhesion` | **❌ MANQUANT** | - |
| DemandeAide | `demandes_aide` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| **Document** | `document` | **❌ MANQUANT** | - |
| **EcritureComptable** | `ecriture_comptable` | **❌ MANQUANT** | - |
| Evenement | `evenements` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| **Favori** | `favori` | **❌ MANQUANT** | - |
| **FormuleAbonnement** | `formule_abonnement` | **❌ MANQUANT** | - |
| EchelonOrganigramme | `echelons_organigramme` | ✅ | V2__Entity_Schema_Alignment.sql |
| InscriptionEvenement | `inscriptions_evenement` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| **IntentionPaiement** | `intention_paiement` | **❌ MANQUANT** | - |
| **JournalComptable** | `journal_comptable` | **❌ MANQUANT** | - |
| **LigneEcriture** | `ligne_ecriture` | **❌ MANQUANT** | - |
| **AuditEntityListener** | `audit_entity_listener` | **❌ MANQUANT** | - |
| **Membre** | `utilisateurs` | **❌ MANQUANT** | - |
| **MembreOrganisation** | `membre_organisation` | **❌ MANQUANT** | - |
| **MembreRole** | `membre_role` | **❌ MANQUANT** | - |
| MembreSuivi | `membre_suivi` | ✅ | V5__Create_Membre_Suivi.sql |
| **ModuleDisponible** | `module_disponible` | **❌ MANQUANT** | - |
| ModuleOrganisationActif | `modules_organisation_actifs` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| DemandeCredit | `demandes_credit` | ✅ | V2__Entity_Schema_Alignment.sql |
| EcheanceCredit | `echeances_credit` | ✅ | V2__Entity_Schema_Alignment.sql |
| GarantieDemande | `garanties_demande` | ✅ | V2__Entity_Schema_Alignment.sql |
| CompteEpargne | `comptes_epargne` | ✅ | V2__Entity_Schema_Alignment.sql |
| TransactionEpargne | `transactions_epargne` | ✅ | V2__Entity_Schema_Alignment.sql |
| Notification | `notifications` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| ProjetOng | `projets_ong` | ✅ | V2__Entity_Schema_Alignment.sql |
| Organisation | `organisations` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| Paiement | `paiements` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| PaiementObjet | `paiements_objets` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| ParametresCotisationOrganisation | `parametres_cotisation_organisation` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| ParametresLcbFt | `parametres_lcb_ft` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| **Permission** | `permission` | **❌ MANQUANT** | - |
| PieceJointe | `pieces_jointes` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| AgrementProfessionnel | `agrements_professionnels` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| Role | `roles` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| **RolePermission** | `role_permission` | **❌ MANQUANT** | - |
| **SouscriptionOrganisation** | `souscription_organisation` | **❌ MANQUANT** | - |
| **Suggestion** | `suggestion` | **❌ MANQUANT** | - |
| **SuggestionVote** | `suggestion_vote` | **❌ MANQUANT** | - |
| SystemAlert | `system_alerts` | ✅ | V7__Monitoring_System.sql |
| SystemLog | `system_logs` | ✅ | V7__Monitoring_System.sql |
| **TemplateNotification** | `template_notification` | **❌ MANQUANT** | - |
| **Ticket** | `ticket` | **❌ MANQUANT** | - |
| Tontine | `tontines` | ✅ | V2__Entity_Schema_Alignment.sql |
| TourTontine | `tours_tontine` | ✅ | V2__Entity_Schema_Alignment.sql |
| TransactionApproval | `transaction_approvals` | ✅ | V6__Create_Finance_Workflow_Tables.sql |
| **TransactionWave** | `transaction_wave` | **❌ MANQUANT** | - |
| TypeReference | `types_reference` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| **ValidationEtapeDemande** | `validation_etape_demande` | **❌ MANQUANT** | - |
| CampagneVote | `campagnes_vote` | ✅ | V2__Entity_Schema_Alignment.sql |
| Candidat | `candidats` | ✅ | V2__Entity_Schema_Alignment.sql |
| WebhookWave | `webhooks_wave` | ✅ | V1__UnionFlow_Complete_Schema.sql |
| WorkflowValidationConfig | `workflow_validation_config` | ✅ | V1__UnionFlow_Complete_Schema.sql |

**Résultat**: 45/71 entités ont une table, 26 manquantes.

---

## 2. Tables orphelines (sans entité)

| Table | Migration(s) |
|-------|--------------|
| `adhesions` | V1__UnionFlow_Complete_Schema.sql |
| `comptes_comptables` | V1__UnionFlow_Complete_Schema.sql |
| `configurations` | V1__UnionFlow_Complete_Schema.sql |
| `configurations_wave` | V1__UnionFlow_Complete_Schema.sql |
| `demandes_adhesion` | V1__UnionFlow_Complete_Schema.sql |
| `documents` | V1__UnionFlow_Complete_Schema.sql |
| `ecritures_comptables` | V1__UnionFlow_Complete_Schema.sql |
| `favoris` | V1__UnionFlow_Complete_Schema.sql |
| `formules_abonnement` | V1__UnionFlow_Complete_Schema.sql |
| `IF` | V1__UnionFlow_Complete_Schema.sql |
| `intentions_paiement` | V1__UnionFlow_Complete_Schema.sql |
| `journaux_comptables` | V1__UnionFlow_Complete_Schema.sql |
| `lignes_ecriture` | V1__UnionFlow_Complete_Schema.sql |
| `membres` | V1__UnionFlow_Complete_Schema.sql |
| `membres_organisations` | V1__UnionFlow_Complete_Schema.sql |
| `membres_roles` | V1__UnionFlow_Complete_Schema.sql |
| `modules_disponibles` | V1__UnionFlow_Complete_Schema.sql |
| `paiements_adhesions` | V1__UnionFlow_Complete_Schema.sql |
| `paiements_aides` | V1__UnionFlow_Complete_Schema.sql |
| `paiements_cotisations` | V1__UnionFlow_Complete_Schema.sql |
| `paiements_evenements` | V1__UnionFlow_Complete_Schema.sql |
| `permissions` | V1__UnionFlow_Complete_Schema.sql |
| `roles_permissions` | V1__UnionFlow_Complete_Schema.sql |
| `souscriptions_organisation` | V1__UnionFlow_Complete_Schema.sql |
| `suggestion_votes` | V1__UnionFlow_Complete_Schema.sql |
| `suggestions` | V1__UnionFlow_Complete_Schema.sql |
| `templates_notifications` | V1__UnionFlow_Complete_Schema.sql |
| `tickets` | V1__UnionFlow_Complete_Schema.sql |
| `transactions_wave` | V1__UnionFlow_Complete_Schema.sql |
| `uf_type_organisation` | V1__UnionFlow_Complete_Schema.sql |
| `validation_etapes_demande` | V1__UnionFlow_Complete_Schema.sql |

---

## 3. Duplications

| Table | Nombre | Migration(s) |
|-------|--------|--------------|

---

*Généré par audit_migrations.sh - Lions Dev*
