From 9a11c84db752531a5451a9f9bbe200055284b2ac Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Tue, 13 Dec 2011 15:59:58 -0500 Subject: [PATCH] cleaning up errors in sql script --- Open-ILS/src/sql/Pg/pines-2.1-updates.sql | 52 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Open-ILS/src/sql/Pg/pines-2.1-updates.sql b/Open-ILS/src/sql/Pg/pines-2.1-updates.sql index f9e49c993e..4d7fd6cead 100644 --- a/Open-ILS/src/sql/Pg/pines-2.1-updates.sql +++ b/Open-ILS/src/sql/Pg/pines-2.1-updates.sql @@ -34,7 +34,7 @@ COMMIT; BEGIN; -- first, change the name and perm_interval of the existing ACQADMIN user: -UPDATE permission.grp_tree SET ( name = 'ACQADMIN', perm_interval = '2 years' ) WHERE id = 44; +UPDATE permission.grp_tree SET name = 'ACQADMIN', perm_interval = '2 years' WHERE id = 44; -- next, add the application_perms to the perm list @@ -47,14 +47,14 @@ INSERT INTO permission.perm_list ( code, description ) VALUES ( 'group_applicati -- then insert the newly-created perm groups -INSERT INTO permission.grp_tree ( id, name, parent, usergroup, perm_interval, description, application_perm, hold_priority ) VALUES ( 46, 'ACQFIN', 43, t, '2 years', 'responsible for all financial transactions, maintaining funds and funding sources, ordering, claiming', 'group_application.user.staff.acq_fin', 0 ); -INSERT INTO permission.grp_tree ( id, name, parent, usergroup, perm_interval, description, application_perm, hold_priority ) VALUES ( 47, 'ACQSEL', 43, t, '2 years', 'administers selection lists across library systems, checks for accuracy', 'group_application.user.staff.acq_sel', 0 ); -INSERT INTO permission.grp_tree ( id, name, parent, usergroup, perm_interval, description, application_perm, hold_priority ) VALUES ( 48, 'ACQLIST', 43, t, '2 years', 'Library or subject selectors, creates selection lists', 'group_application.user.staff.acq_list', 0 ); -INSERT INTO permission.grp_tree ( id, name, parent, usergroup, perm_interval, description, application_perm, hold_priority ) VALUES ( 49, 'ACQREC', 43, t, '2 years', 'receives orders for system', 'group_application.user.staff.acq_rec', 0 ); -INSERT INTO permission.grp_tree ( id, name, parent, usergroup, perm_interval, description, application_perm, hold_priority ) VALUES ( 50, 'ACQCAT', 43, t, '2 years', 'administers cataloging functions within acquisitions, links line items to PINES catalog, monitors brief records for accuracy, loads MARC records into catalog', 'group_application.user.staff.acq_cat', 0 ); -INSERT INTO permission.grp_tree ( id, name, parent, usergroup, perm_interval, description, application_perm, hold_priority ) VALUES ( 51, 'GLOBAL-ACQADMIN', 43, t, '2 years', 'Consortium-level Acq administrator', 'group_application.user.staff.global_acq_admin', 0 ); +INSERT INTO permission.grp_tree ( id, name, parent, usergroup, perm_interval, description, application_perm, hold_priority ) VALUES ( 46, 'ACQFIN', 43, 't', '2 years', 'responsible for all financial transactions, maintaining funds and funding sources, ordering, claiming', 'group_application.user.staff.acq_fin', 0 ); +INSERT INTO permission.grp_tree ( id, name, parent, usergroup, perm_interval, description, application_perm, hold_priority ) VALUES ( 47, 'ACQSEL', 43, 't', '2 years', 'administers selection lists across library systems, checks for accuracy', 'group_application.user.staff.acq_sel', 0 ); +INSERT INTO permission.grp_tree ( id, name, parent, usergroup, perm_interval, description, application_perm, hold_priority ) VALUES ( 48, 'ACQLIST', 43, 't', '2 years', 'Library or subject selectors, creates selection lists', 'group_application.user.staff.acq_list', 0 ); +INSERT INTO permission.grp_tree ( id, name, parent, usergroup, perm_interval, description, application_perm, hold_priority ) VALUES ( 49, 'ACQREC', 43, 't', '2 years', 'receives orders for system', 'group_application.user.staff.acq_rec', 0 ); +INSERT INTO permission.grp_tree ( id, name, parent, usergroup, perm_interval, description, application_perm, hold_priority ) VALUES ( 50, 'ACQCAT', 43, 't', '2 years', 'administers cataloging functions within acquisitions, links line items to PINES catalog, monitors brief records for accuracy, loads MARC records into catalog', 'group_application.user.staff.acq_cat', 0 ); +INSERT INTO permission.grp_tree ( id, name, parent, usergroup, perm_interval, description, application_perm, hold_priority ) VALUES ( 51, 'GLOBAL-ACQADMIN', 43, 't', '2 years', 'Consortium-level Acq administrator', 'group_application.user.staff.global_acq_admin', 0 ); --- then assign permissions to the groups +-- and finally, assign permissions to the groups INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) VALUES ( 27, ( SELECT id FROM permission.perm_list WHERE CODE = 'DELETE_MONOGRAPH_PART' ), 0, 'f' ); INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) VALUES ( 27, ( SELECT id FROM permission.perm_list WHERE CODE = 'UPDATE_MONOGRAPH_PART' ), 0, 'f' ); @@ -214,24 +214,24 @@ COMMIT; BEGIN; -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 1, 1, 'book', NULL, NULL, NULL, f, NULL, NULL, NULL, NULL, NULL, 6, 1, NULL, NULL, NULL, NULL, NULL, 66, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 1, 1, 'book', NULL, NULL, NULL, t, NULL, NULL, NULL, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 66, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 1, 1, 'dvd', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, 231, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 1, 1, 'video', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, 231, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 1, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 3, 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 1, 22, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 3, 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 1, 42, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 3, 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 1, 17, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5, 3, 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 260, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 80, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 6, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 216, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 33, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 275, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 'f', 106, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 140, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 231, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); -INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, is_renewal, user_age_lower_bound, user_age_upper_bound, juvenile_flag, circulate, duration_rule, recurring_fine_rule, max_fine_rule, script_test ) VALUES ( 't', 197, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 1, 1, 'book', 'f', 6, 1, NULL, 66 ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 1, 1, 'book', 't', 10, NULL, NULL, 66 ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 1, 1, 'dvd', NULL, NULL, 1, NULL, 231 ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 1, 1, 'video', NULL, NULL, 1, NULL, 231 ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 1, 3, NULL, NULL, NULL, 3, 7, NULL ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 1, 22, NULL, NULL, NULL, 3, 7, NULL ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 1, 42, NULL, NULL, NULL, 3, 7, NULL ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 1, 17, NULL, NULL, 5, 3, 7, NULL ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 260, 1, NULL, NULL, NULL, NULL, 3, NULL ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 80, 1, NULL, NULL, NULL, NULL, 3, NULL ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 6, 1, NULL, NULL, NULL, NULL, 2, NULL ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 216, 1, NULL, NULL, NULL, NULL, 2, NULL ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 33, 1, NULL, NULL, NULL, NULL, 2, NULL ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 275, 1, NULL, NULL, NULL, NULL, 2, NULL ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 'f', 106, 1, NULL, NULL, NULL, NULL, 2, NULL ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 140, 1, NULL, NULL, NULL, NULL, 2, NULL ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 231, 1, NULL, NULL, NULL, NULL, 2, NULL ); +INSERT INTO config.circ_matrix_matchpoint ( active, org_unit, grp, circ_modifier, ref_flag, duration_rule, recurring_fine_rule, max_fine_rule, copy_circ_lib ) VALUES ( 't', 197, 1, NULL, NULL, NULL, NULL, 2, NULL ); COMMIT; -- 2.11.0