diff --git a/src/main/resources/db/migration/V18__Add_Organisation_Categorie_Type_And_Seed_Official_Types.sql b/src/main/resources/db/migration/V18__Add_Organisation_Categorie_Type_And_Seed_Official_Types.sql index 99af3b7..4dae0b2 100644 --- a/src/main/resources/db/migration/V18__Add_Organisation_Categorie_Type_And_Seed_Official_Types.sql +++ b/src/main/resources/db/migration/V18__Add_Organisation_Categorie_Type_And_Seed_Official_Types.sql @@ -70,13 +70,14 @@ WHERE NOT EXISTS ( ); -- Catégorie FINANCIER_SOLIDAIRE +-- Note : MUTUELLE unifié (pas de séparation épargne/crédit — cadre réglementaire BCEAO/UEMOA) +-- Les MEC/COOPEC font TOUJOURS épargne ET crédit conjointement. INSERT INTO types_reference (id, domaine, libelle, code, categorie, modules_requis, actif, est_defaut, est_systeme, ordre_affichage, date_creation, date_modification, version) SELECT gen_random_uuid(), 'TYPE_ORGANISATION', v.libelle, v.code, v.categorie, v.modules_requis, true, false, true, 0, NOW(), NOW(), 0 FROM (VALUES - ('Tontine', 'TONTINE', 'FINANCIER_SOLIDAIRE', 'MEMBRES,COTISATIONS,TONTINE,COMMUNICATION,DOCUMENTS,FINANCE'), - ('Mutuelle d''Épargne', 'MUTUELLE_EPARGNE', 'FINANCIER_SOLIDAIRE', 'MEMBRES,COTISATIONS,EPARGNE,COMMUNICATION,DOCUMENTS,FINANCE,LCB_FT'), - ('Mutuelle de Crédit', 'MUTUELLE_CREDIT', 'FINANCIER_SOLIDAIRE', 'MEMBRES,COTISATIONS,EPARGNE,CREDIT,COMMUNICATION,DOCUMENTS,FINANCE,LCB_FT'), - ('Coopérative', 'COOPERATIVE', 'FINANCIER_SOLIDAIRE', 'MEMBRES,COTISATIONS,AGRICULTURE,COMMUNICATION,DOCUMENTS,FINANCE') + ('Tontine', 'TONTINE', 'FINANCIER_SOLIDAIRE', 'MEMBRES,COTISATIONS,TONTINE,COMMUNICATION,DOCUMENTS,FINANCE'), + ('Mutuelle d''Épargne et de Crédit', 'MUTUELLE', 'FINANCIER_SOLIDAIRE', 'MEMBRES,COTISATIONS,EPARGNE,CREDIT,COMMUNICATION,DOCUMENTS,FINANCE,LCB_FT'), + ('Coopérative', 'COOPERATIVE', 'FINANCIER_SOLIDAIRE', 'MEMBRES,COTISATIONS,AGRICULTURE,EPARGNE,VOTES,COMMUNICATION,DOCUMENTS,FINANCE') ) AS v(libelle, code, categorie, modules_requis) WHERE NOT EXISTS ( SELECT 1 FROM types_reference WHERE types_reference.code = v.code AND domaine = 'TYPE_ORGANISATION'