LP1849212: some fixes to seed data and upgrade script
authorJane Sandberg <sandbej@linnbenton.edu>
Wed, 2 Sep 2020 19:03:31 +0000 (12:03 -0700)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 14 Sep 2020 22:17:39 +0000 (18:17 -0400)
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.course-materials-module.sql

index d5b0946..214aacc 100644 (file)
@@ -4,6 +4,8 @@ INSERT INTO config.bib_source (id, quality, source, transcendant, can_have_copie
     (2, 10, oils_i18n_gettext(2, 'System Local', 'cbs', 'source'), FALSE, TRUE);
 INSERT INTO config.bib_source (id, quality, source, transcendant, can_have_copies) VALUES 
     (3, 1, oils_i18n_gettext(3, 'Project Gutenberg', 'cbs', 'source'), TRUE, TRUE);
+INSERT INTO config.bib_source (id, quality, source, transcendant, can_have_copies) VALUES
+    (4, 1, oils_i18n_gettext(4, 'Course materials module', 'cbs', 'source'), TRUE, FALSE);
 SELECT SETVAL('config.bib_source_id_seq'::TEXT, 100);
 
 INSERT INTO biblio.peer_type (id,name) VALUES
@@ -20631,8 +20633,6 @@ VALUES (
         'cwst', 'label'
     )
 );
-INSERT INTO config.bib_source (quality, source, transcendant) VALUES
-    (1, oils_i18n_gettext(1, 'Course materials module', 'cbs', 'source'), TRUE);
 
 INSERT INTO actor.org_unit_setting (org_unit, name, value)
     SELECT 1, 'circ.course_materials_brief_record_bib_source', id
@@ -20643,6 +20643,8 @@ INSERT INTO asset.course_module_role (id, name, is_public) VALUES
 (1, oils_i18n_gettext(1, 'Instructor', 'acmr', 'name'), true),
 (2, oils_i18n_gettext(2, 'Teaching assistant', 'acmr', 'name'), true),
 (3, oils_i18n_gettext(2, 'Student', 'acmr', 'name'), false);
+SELECT SETVAL('asset.course_module_role_id_seq'::TEXT, 100);
+
 
 
 INSERT INTO config.workstation_setting_type (name, grp, datatype, label)
index 7d903a4..00a78f5 100644 (file)
@@ -51,6 +51,8 @@ INSERT INTO asset.course_module_role (id, name, is_public) VALUES
 (2, oils_i18n_gettext(2, 'Teaching assistant', 'acmr', 'name'), true),
 (3, oils_i18n_gettext(2, 'Student', 'acmr', 'name'), false);
 
+SELECT SETVAL('asset.course_module_role_id_seq'::TEXT, 100);
+
 CREATE TABLE asset.course_module_term_course_map (
     id              BIGSERIAL  PRIMARY KEY,
     term            INT     NOT NULL REFERENCES asset.course_module_term (id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
@@ -120,7 +122,7 @@ VALUES (
 );
 
 INSERT INTO config.bib_source (quality, source, transcendant) VALUES
-    (1, oils_i18n_gettext(1, 'Course materials module', 'cbs', 'source'), TRUE);
+    (1, oils_i18n_gettext(4, 'Course materials module', 'cbs', 'source'), TRUE);
 
 INSERT INTO actor.org_unit_setting (org_unit, name, value)
     SELECT 1, 'circ.course_materials_brief_record_bib_source', id