Stamping upgrade script for "Org unit selective hiding and sorting in tpac library...
authorMike Rylander <mrylander@gmail.com>
Mon, 2 Apr 2012 17:41:00 +0000 (13:41 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 2 Apr 2012 17:41:00 +0000 (13:41 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0702.schema.org_unit_opac_vis_and_sorting.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.org_unit_opac_vis_and_sorting.sql [deleted file]

index 34224b1..734f3a9 100644 (file)
@@ -87,7 +87,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');
 
     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 ('0701', :eg_version); -- sprater/bshum/tsbere
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0702', :eg_version); -- berick/miker
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0702.schema.org_unit_opac_vis_and_sorting.sql b/Open-ILS/src/sql/Pg/upgrade/0702.schema.org_unit_opac_vis_and_sorting.sql
new file mode 100644 (file)
index 0000000..8c6cd4f
--- /dev/null
@@ -0,0 +1,45 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0702', :eg_version);
+
+INSERT INTO config.global_flag (name, enabled, label) 
+    VALUES (
+        'opac.org_unit.non_inheritied_visibility',
+        FALSE,
+        oils_i18n_gettext(
+            'opac.org_unit.non_inheritied_visibility',
+            'Org Units Do Not Inherit Visibility',
+            'cgf',
+            'label'
+        )
+    );
+
+CREATE TYPE actor.org_unit_custom_tree_purpose AS ENUM ('opac');
+
+CREATE TABLE actor.org_unit_custom_tree (
+    id              SERIAL  PRIMARY KEY,
+    active          BOOLEAN DEFAULT FALSE,
+    purpose         actor.org_unit_custom_tree_purpose NOT NULL DEFAULT 'opac' UNIQUE
+);
+
+CREATE TABLE actor.org_unit_custom_tree_node (
+    id              SERIAL  PRIMARY KEY,
+    tree            INTEGER REFERENCES actor.org_unit_custom_tree (id) DEFERRABLE INITIALLY DEFERRED,
+       org_unit        INTEGER NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
+       parent_node     INTEGER REFERENCES actor.org_unit_custom_tree_node (id) DEFERRABLE INITIALLY DEFERRED,
+    sibling_order   INTEGER NOT NULL DEFAULT 0,
+    CONSTRAINT aouctn_once_per_org UNIQUE (tree, org_unit)
+);
+    
+
+COMMIT;
+
+/* UNDO
+BEGIN;
+DELETE FROM config.global_flag WHERE name = 'opac.org_unit.non_inheritied_visibility';
+DROP TABLE actor.org_unit_custom_tree_node;
+DROP TABLE actor.org_unit_custom_tree;
+DROP TYPE actor.org_unit_custom_tree_purpose;
+COMMIT;
+*/
+
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.org_unit_opac_vis_and_sorting.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.org_unit_opac_vis_and_sorting.sql
deleted file mode 100644 (file)
index fd1c002..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-BEGIN;
-
---SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-INSERT INTO config.global_flag (name, enabled, label) 
-    VALUES (
-        'opac.org_unit.non_inheritied_visibility',
-        FALSE,
-        oils_i18n_gettext(
-            'opac.org_unit.non_inheritied_visibility',
-            'Org Units Do Not Inherit Visibility',
-            'cgf',
-            'label'
-        )
-    );
-
-CREATE TYPE actor.org_unit_custom_tree_purpose AS ENUM ('opac');
-
-CREATE TABLE actor.org_unit_custom_tree (
-    id              SERIAL  PRIMARY KEY,
-    active          BOOLEAN DEFAULT FALSE,
-    purpose         actor.org_unit_custom_tree_purpose NOT NULL DEFAULT 'opac' UNIQUE
-);
-
-CREATE TABLE actor.org_unit_custom_tree_node (
-    id              SERIAL  PRIMARY KEY,
-    tree            INTEGER REFERENCES actor.org_unit_custom_tree (id) DEFERRABLE INITIALLY DEFERRED,
-       org_unit        INTEGER NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
-       parent_node     INTEGER REFERENCES actor.org_unit_custom_tree_node (id) DEFERRABLE INITIALLY DEFERRED,
-    sibling_order   INTEGER NOT NULL DEFAULT 0,
-    CONSTRAINT aouctn_once_per_org UNIQUE (tree, org_unit)
-);
-    
-
-COMMIT;
-
-/* UNDO
-BEGIN;
-DELETE FROM config.global_flag WHERE name = 'opac.org_unit.non_inheritied_visibility';
-DROP TABLE actor.org_unit_custom_tree_node;
-DROP TABLE actor.org_unit_custom_tree;
-DROP TYPE actor.org_unit_custom_tree_purpose;
-COMMIT;
-*/
-