diff --git a/server/controllers/socis.controller.js b/server/controllers/socis.controller.js index 96f2f867..7a95792f 100644 --- a/server/controllers/socis.controller.js +++ b/server/controllers/socis.controller.js @@ -263,6 +263,23 @@ exports.socis_delete = (req, res, next) => { FROM historial_socis WHERE id_historial_soci = @id_persona; + DELETE + FROM socis_acceptacions + WHERE id_soci = @id_persona; + + DELETE + FROM socis_activitats + WHERE id_soci = @id_persona; + + DELETE sav + FROM socis_agrupacions_veus sav + INNER JOIN socis_agrupacions USING (id_soci_agrupacio) + WHERE id_soci = @id_persona; + + DELETE + FROM socis_agrupacions + WHERE id_soci = @id_persona; + DELETE FROM socis WHERE id_soci = @id_persona;