From ffbf56ca5b72d337980769f3b809bffa67cb78d6 Mon Sep 17 00:00:00 2001 From: Rogan Hamby Date: Tue, 21 Feb 2017 10:38:35 -0500 Subject: [PATCH] modified load all and removing old bibs file, integrating kmlussier's changes into my branch --- Open-ILS/tests/datasets/sql/assets_mr.sql | 28 ++++++++++++++++++++++ .../sql/{bibs_metagroups.sql => bibs_mr.sql} | 2 +- Open-ILS/tests/datasets/sql/load_all.sql | 12 +++++++--- 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 Open-ILS/tests/datasets/sql/assets_mr.sql rename Open-ILS/tests/datasets/sql/{bibs_metagroups.sql => bibs_mr.sql} (99%) diff --git a/Open-ILS/tests/datasets/sql/assets_mr.sql b/Open-ILS/tests/datasets/sql/assets_mr.sql new file mode 100644 index 0000000000..2fafd63a1b --- /dev/null +++ b/Open-ILS/tests/datasets/sql/assets_mr.sql @@ -0,0 +1,28 @@ +-- Create call numbers +SELECT evergreen.populate_call_number(4, 'MR ', 'IMPORT MR', NULL); -- BR1 +SELECT evergreen.populate_call_number(5, 'MR ', 'IMPORT MR', NULL); -- BR2 +SELECT evergreen.populate_call_number(6, 'MR ', 'IMPORT MR', NULL); -- BR3 +SELECT evergreen.populate_call_number(7, 'MR ', 'IMPORT MR', NULL); -- BR4 +SELECT evergreen.populate_call_number(9, 'MR ', 'IMPORT MR', NULL); -- BM1 + +-- Create copies +SELECT evergreen.populate_copy(4, 4, 'MR40000', 'MR'); -- BR1 +SELECT evergreen.populate_copy(5, 5, 'MR50000', 'MR'); -- BR2 +SELECT evergreen.populate_copy(6, 6, 'MR60000', 'MR'); -- BR3 +SELECT evergreen.populate_copy(7, 7, 'MR70000', 'MR'); -- BR4 +SELECT evergreen.populate_copy(9, 9, 'MR90000', 'MR'); -- BM1 + +SELECT evergreen.populate_copy(4, 4, 'MR41000', 'MR'); -- BR1 +SELECT evergreen.populate_copy(4, 4, 'MR42000', 'MR'); -- BR1 +SELECT evergreen.populate_copy(4, 4, 'MR43000', 'MR'); -- BR1 +SELECT evergreen.populate_copy(4, 4, 'MR44000', 'MR'); -- BR1 +SELECT evergreen.populate_copy(4, 4, 'MR45000', 'MR'); -- BR1 +SELECT evergreen.populate_copy(4, 4, 'MR46000', 'MR'); -- BR1 +SELECT evergreen.populate_copy(4, 4, 'MR47000', 'MR'); -- BR1 +SELECT evergreen.populate_copy(4, 4, 'MR48000', 'MR'); -- BR1 +SELECT evergreen.populate_copy(4, 4, 'MR49000', 'MR'); -- BR1 + +SELECT evergreen.populate_copy(5, 5, 'MR51000', 'MR'); -- BR2 +SELECT evergreen.populate_copy(6, 6, 'MR61000', 'MR'); -- BR3 +SELECT evergreen.populate_copy(7, 7, 'MR71000', 'MR'); -- BR4 +SELECT evergreen.populate_copy(9, 9, 'MR91000', 'MR'); -- BM1 diff --git a/Open-ILS/tests/datasets/sql/bibs_metagroups.sql b/Open-ILS/tests/datasets/sql/bibs_mr.sql similarity index 99% rename from Open-ILS/tests/datasets/sql/bibs_metagroups.sql rename to Open-ILS/tests/datasets/sql/bibs_mr.sql index a7e5a1d148..04f4895349 100644 --- a/Open-ILS/tests/datasets/sql/bibs_metagroups.sql +++ b/Open-ILS/tests/datasets/sql/bibs_mr.sql @@ -1,4 +1,4 @@ -\set bib_tag '''IMPORT META GROUPS''' +\set bib_tag '''IMPORT MR''' INSERT INTO marcxml_import (tag, marc) VALUES diff --git a/Open-ILS/tests/datasets/sql/load_all.sql b/Open-ILS/tests/datasets/sql/load_all.sql index b92155ce4a..52b7ee0d5d 100644 --- a/Open-ILS/tests/datasets/sql/load_all.sql +++ b/Open-ILS/tests/datasets/sql/load_all.sql @@ -1,4 +1,4 @@ -BEGIN; +N; -- stop on error \set ON_ERROR_STOP on @@ -30,8 +30,11 @@ BEGIN; -- load RDA bibs \i bibs_rda.sql --- load bibs for metarecord groups -\i bibs_metagroups.sql +-- load EbookAPI bibs +\i bibs_ebook_api.sql + +-- load metarecord bibs +\i bibs_mr.sql -- insert all loaded bibs into the biblio.record_entry in insert order INSERT INTO biblio.record_entry (marc, last_xact_id) @@ -52,6 +55,9 @@ INSERT INTO biblio.record_entry (marc, last_xact_id) -- load RDA copies, etc. \i assets_rda.sql +-- load MR copies, etc. +\i assets_mr.sql + -- load copy-related data \i assets_extras.sql -- 2.11.0