]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/0606.schema.czs_use_perm_column.sql
LP#1178377: Make bib source optional element from unapi.bre
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 0606.schema.czs_use_perm_column.sql
1 -- Evergreen DB patch 0606.schema.czs_use_perm_column.sql
2 --
3 -- This adds a column to config.z3950_source called use_perm.
4 -- The idea is that if a permission is set for a given source,
5 -- then staff will need the referenced permission to use that
6 -- source.
7 --
8 BEGIN;
9
10 -- check whether patch can be applied
11 SELECT evergreen.upgrade_deps_block_check('0606', :eg_version);
12
13 ALTER TABLE config.z3950_source 
14     ADD COLUMN use_perm INT REFERENCES permission.perm_list (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED;
15
16 COMMENT ON COLUMN config.z3950_source.use_perm IS $$
17 If set, this permission is required for the source to be listed in the staff
18 client Z39.50 interface.  Similar to permission.grp_tree.application_perm.
19 $$;
20
21 COMMIT;