From 551892a2e39a8e8375e238cd3ab0acdbd3983fd5 Mon Sep 17 00:00:00 2001 From: albert Date: Mon, 1 Jun 2020 00:37:54 +0200 Subject: [PATCH] =?UTF-8?q?Afegides=20consultes=20que=20faltaven=20d?= =?UTF-8?q?=E2=80=98eliminaci=C3=B3=20de=20taules=20relatives=20al=20soci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/controllers/socis.controller.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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;