aboutsummaryrefslogtreecommitdiffstats
path: root/extra/sql
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-06-06 13:47:21 +0200
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-06-06 14:22:52 +0200
commit7a58af870eb9934dfec4b5353672d7c428208116 (patch)
tree67763a011cbc4c0f94405864dd19f2fd7f07b839 /extra/sql
parent6b6521b5824f61dea05f400dba41092f3aaa0697 (diff)
Minor Improvement
Code rework postponed to Casablanca to not impact Bejing release + Update version to 3.0.0 Issue-ID: CLAMP-177 Change-Id: I3e2cb22c1158df0cf5d4cf8369f9c469004d68c0 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'extra/sql')
-rw-r--r--extra/sql/bulkload/clds-stored-procedures.sql11
1 files changed, 11 insertions, 0 deletions
diff --git a/extra/sql/bulkload/clds-stored-procedures.sql b/extra/sql/bulkload/clds-stored-procedures.sql
index 112cb2b55..d09d3fc81 100644
--- a/extra/sql/bulkload/clds-stored-procedures.sql
+++ b/extra/sql/bulkload/clds-stored-procedures.sql
@@ -14,6 +14,7 @@ DROP PROCEDURE IF EXISTS get_model;
DROP PROCEDURE IF EXISTS get_model_template;
DROP PROCEDURE IF EXISTS set_template;
DROP PROCEDURE IF EXISTS get_template;
+DROP PROCEDURE IF EXISTS del_model;
DELIMITER //
CREATE PROCEDURE get_template
(IN v_template_name VARCHAR(80),
@@ -444,6 +445,16 @@ BEGIN
UPDATE event
SET process_instance_id = v_process_instance_id
WHERE event_id = v_event_id;
+END;
+CREATE PROCEDURE del_model (IN v_model_name VARCHAR(80))
+BEGIN
+ DECLARE v_model_id VARCHAR(36);
+ SELECT model_id INTO v_model_id from model where model_name = v_model_name;
+ UPDATE model set event_id = null, model_blueprint_id = null, model_prop_id = null where model_id = v_model_id;
+ DELETE from event where model_id = v_model_id;
+ DELETE from model_blueprint where model_id = v_model_id;
+ DELETE from model_properties where model_id = v_model_id;
+ DELETE from model where model_id = v_model_id;
END
//
DELIMITER ;