3 SELECT evergreen.upgrade_deps_block_check('0702', :eg_version);
5 INSERT INTO config.global_flag (name, enabled, label)
7 'opac.org_unit.non_inheritied_visibility',
10 'opac.org_unit.non_inheritied_visibility',
11 'Org Units Do Not Inherit Visibility',
17 CREATE TYPE actor.org_unit_custom_tree_purpose AS ENUM ('opac');
19 CREATE TABLE actor.org_unit_custom_tree (
20 id SERIAL PRIMARY KEY,
21 active BOOLEAN DEFAULT FALSE,
22 purpose actor.org_unit_custom_tree_purpose NOT NULL DEFAULT 'opac' UNIQUE
25 CREATE TABLE actor.org_unit_custom_tree_node (
26 id SERIAL PRIMARY KEY,
27 tree INTEGER REFERENCES actor.org_unit_custom_tree (id) DEFERRABLE INITIALLY DEFERRED,
28 org_unit INTEGER NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
29 parent_node INTEGER REFERENCES actor.org_unit_custom_tree_node (id) DEFERRABLE INITIALLY DEFERRED,
30 sibling_order INTEGER NOT NULL DEFAULT 0,
31 CONSTRAINT aouctn_once_per_org UNIQUE (tree, org_unit)
39 DELETE FROM config.global_flag WHERE name = 'opac.org_unit.non_inheritied_visibility';
40 DROP TABLE actor.org_unit_custom_tree_node;
41 DROP TABLE actor.org_unit_custom_tree;
42 DROP TYPE actor.org_unit_custom_tree_purpose;