We can't assume that 0526 was in fact run previously so we need to drop these more...
authorJames Fournie <jfournie@sitka.bclibraries.ca>
Mon, 7 May 2012 18:08:06 +0000 (11:08 -0700)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 8 May 2012 16:11:59 +0000 (12:11 -0400)
to avoid producing an error if 0526 wasn't run previously

Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/sql/Pg/version-upgrade/2.1-2.2-upgrade-db.sql

index c728c5a..4f8dff4 100644 (file)
@@ -6,9 +6,9 @@
 -- DROP objects that might have existed from a prior run of 0526
 -- Yes this is ironic.
 DROP TABLE IF EXISTS config.db_patch_dependencies;
-ALTER TABLE config.upgrade_log DROP COLUMN applied_to;
-DROP FUNCTION evergreen.upgrade_list_applied_deprecates(TEXT);
-DROP FUNCTION evergreen.upgrade_list_applied_supersedes(TEXT);
+ALTER TABLE config.upgrade_log DROP COLUMN IF EXISTS applied_to;
+DROP FUNCTION IF EXISTS evergreen.upgrade_list_applied_deprecates(TEXT);
+DROP FUNCTION IF EXISTS evergreen.upgrade_list_applied_supersedes(TEXT);
 
 BEGIN;
 INSERT INTO config.upgrade_log (version) VALUES ('2.2-beta2');