Move the new ebook bibs to the end of the script and away from the
rest of bib loading and item creation to avoid breaking tests.
Signed-off-by: Ben Shum <ben@evergreener.net>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
-- load RDA bibs
\i bibs_rda.sql
--- load EbookAPI bibs
-\i bibs_ebook_api.sql
-
-- insert all loaded bibs into the biblio.record_entry in insert order
INSERT INTO biblio.record_entry (marc, last_xact_id)
SELECT marc, tag FROM marcxml_import ORDER BY id;
-- funds, orders, etc.
\i acq.sql
+-- delete previously imported bibs
+DELETE FROM marcxml_import;
+
+-- load EbookAPI bibs
+\i bibs_ebook_api.sql
+
+-- insert all loaded bibs into the biblio.record_entry in insert order
+INSERT INTO biblio.record_entry (marc, last_xact_id)
+ SELECT marc, tag FROM marcxml_import ORDER BY id;
+
-- clean up the env
\i env_destroy.sql