Index: openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-packages-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-packages-create.sql,v
diff -u -r1.17 -r1.17.2.1
--- openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-packages-create.sql	27 Oct 2014 16:39:43 -0000	1.17
+++ openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-packages-create.sql	17 Mar 2017 13:40:20 -0000	1.17.2.1
@@ -433,12 +433,13 @@
    p_impl_name varchar
 ) RETURNS integer AS $$
 DECLARE
+  v_impl_id integer;
 BEGIN
 
-    delete from acs_sc_impls
-    where impl_contract_name = p_impl_contract_name
-    and impl_name = p_impl_name;
+    v_impl_id := acs_sc_impl__get_id(p_impl_contract_name,p_impl_name);
 
+    perform acs_object__delete(v_impl_id);
+
     return 0;
 
 END;
