LP#1322285: Fix the upgrade script. collab/miker/no-ff-defaults-for-ingest
authorJason Stephenson <jstephenson@mvlc.org>
Thu, 31 Jul 2014 14:29:29 +0000 (10:29 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Thu, 31 Jul 2014 14:32:49 +0000 (10:32 -0400)
Add "IF EXISTS" after DROP FUNCTION, 'cause my database was missing at
least one of those forms.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/sql/Pg/upgrade/XXXX.function.no-ff-defaults.sql

index 5060dc6..970c285 100644 (file)
@@ -97,9 +97,9 @@ BEGIN
 END;
 $func$ LANGUAGE PLPGSQL;
 
-DROP FUNCTION vandelay.marc21_extract_fixed_field_list( text, text );
-DROP FUNCTION vandelay.marc21_extract_fixed_field( text, text );
-DROP FUNCTION vandelay.marc21_extract_all_fixed_fields( text, text );
+DROP FUNCTION IF EXISTS vandelay.marc21_extract_fixed_field_list( text, text );
+DROP FUNCTION IF EXISTS vandelay.marc21_extract_fixed_field( text, text );
+DROP FUNCTION IF EXISTS vandelay.marc21_extract_all_fixed_fields( text, text );
 
 COMMIT;