stamp an upgrade version for the czs use_perm feature
authorJason Etheridge <jason@esilibrary.com>
Mon, 22 Aug 2011 21:32:09 +0000 (17:32 -0400)
committerJason Etheridge <jason@esilibrary.com>
Mon, 22 Aug 2011 21:33:27 +0000 (17:33 -0400)
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0606.schema.czs_use_perm_column.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.czs_use_perm_column.sql [deleted file]

index 1e14f28..f4528b6 100644 (file)
@@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0605', :eg_version); -- dbwells/dbs
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0606', :eg_version); -- phasefx/berick
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0606.schema.czs_use_perm_column.sql b/Open-ILS/src/sql/Pg/upgrade/0606.schema.czs_use_perm_column.sql
new file mode 100644 (file)
index 0000000..0518f24
--- /dev/null
@@ -0,0 +1,21 @@
+-- Evergreen DB patch 0606.schema.czs_use_perm_column.sql
+--
+-- This adds a column to config.z3950_source called use_perm.
+-- The idea is that if a permission is set for a given source,
+-- then staff will need the referenced permission to use that
+-- source.
+--
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0606', :eg_version);
+
+ALTER TABLE config.z3950_source 
+    ADD COLUMN use_perm INT REFERENCES permission.perm_list (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED;
+
+COMMENT ON COLUMN config.z3950_source.use_perm IS $$
+If set, this permission is required for the source to be listed in the staff
+client Z39.50 interface.  Similar to permission.grp_tree.application_perm.
+$$;
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.czs_use_perm_column.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.czs_use_perm_column.sql
deleted file mode 100644 (file)
index db1f077..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
--- Evergreen DB patch XXXX.schema.czs_use_perm_column.sql
---
--- This adds a column to config.z3950_source called use_perm.
--- The idea is that if a permission is set for a given source,
--- then staff will need the referenced permission to use that
--- source.
---
-BEGIN;
-
--- check whether patch can be applied
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-ALTER TABLE config.z3950_source 
-    ADD COLUMN use_perm INT REFERENCES permission.perm_list (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED;
-
-COMMENT ON COLUMN config.z3950_source.use_perm IS $$
-If set, this permission is required for the source to be listed in the staff
-client Z39.50 interface.  Similar to permission.grp_tree.application_perm.
-$$;
-
-COMMIT;