BankTransaction: Kosmetik: Ausrichtung und "make emacs happy"
[kivitendo-erp.git] / sql / Pg-upgrade2 / requirement_spec_items_update_trigger_fix2.sql
index fd9729f..9f714da 100644 (file)
@@ -6,7 +6,12 @@
 -- children. item_id is the ID of the item that needs to be updated
 -- (or NULL if the requirement spec itself must be updated/a section
 -- was changed).
-CREATE OR REPLACE FUNCTION update_requirement_spec_item_time_estimation(item_id INTEGER, item_requirement_spec_id INTEGER) RETURNS BOOLEAN AS $$
+
+-- This function must be dropped manually because PostgreSQL cannot
+-- rename function parameters with 'CREATE OR REPLACE FUNCTION ...'
+-- anymore.
+DROP FUNCTION update_requirement_spec_item_time_estimation(item_id INTEGER, requirement_spec_id INTEGER);
+CREATE FUNCTION update_requirement_spec_item_time_estimation(item_id INTEGER, item_requirement_spec_id INTEGER) RETURNS BOOLEAN AS $$
   DECLARE
     current_row RECORD;
     new_row     RECORD;
@@ -18,7 +23,7 @@ CREATE OR REPLACE FUNCTION update_requirement_spec_item_time_estimation(item_id
          OR ((key = 'deleting_requirement_spec')      AND (value = CAST(item_requirement_spec_id AS TEXT)))
       LIMIT 1
     ) THEN
-      RAISE DEBUG 'updateRSIE: item_id % or requirement_spec_id % is about to be deleted; do not update', item_id, requirement_spec_id;
+      RAISE DEBUG 'updateRSIE: item_id % or requirement_spec_id % is about to be deleted; do not update', item_id, item_requirement_spec_id;
       RETURN FALSE;
     END IF;