From 5c87ddf8cbfa1a76e12ce651b0b0e4d92d956cf9 Mon Sep 17 00:00:00 2001 From: Kathy Lussier Date: Mon, 20 Feb 2017 20:08:07 -0500 Subject: [PATCH] LP#1665626: Move new metarecord bibs Moving the new metarecord bibs to a new sql script to prevent bumping of existing bibs, which breaks tests. Signed-off-by: Kathy Lussier --- Open-ILS/tests/datasets/sql/assets_mr.sql | 28 ++++++++++++++++++++++++++++ Open-ILS/tests/datasets/sql/bibs_fic.sql | 5 +---- Open-ILS/tests/datasets/sql/bibs_mr.sql | 7 +++++++ Open-ILS/tests/datasets/sql/load_all.sql | 6 ++++++ 4 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 Open-ILS/tests/datasets/sql/assets_mr.sql create mode 100644 Open-ILS/tests/datasets/sql/bibs_mr.sql 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_fic.sql b/Open-ILS/tests/datasets/sql/bibs_fic.sql index de2604cb75..c6e50f08e2 100644 --- a/Open-ILS/tests/datasets/sql/bibs_fic.sql +++ b/Open-ILS/tests/datasets/sql/bibs_fic.sql @@ -18,8 +18,5 @@ INSERT INTO marcxml_import (tag, marc) VALUES (:bib_tag,'01540nam a22003254a 4500684CONS20130416180316.0090420s2008 caua e 00 c eng d9781582406725 (pbk.)1582406723 (pbk.)(SC LENDS)1948733741.597322FIC - KIRGN - WALKING Kirkman, Robert.The walking dead.[Vol. 1]Days gone bye /Robert Kirkman, creator, writer, letterer ; Tony Moore, penciler, inker, gray tones ; Cliff Rathburn, additional gray tones].Days gone bye.Title on half title page:Image Comics presents the Walking dead.Orange, Calif. :Image Comics,c2008.1 v. (unpaged) :ill. ;26 cm.Police officer Rick Grimes is shot on the job and wakes up a month later to find that the world that he knows is gone. Zombies have taken over and are killing and eating those who are still alive. He sets out toward Atlanta in the hope that his family is still alive and endures may horrors along the way."Title, author and illustrators from cover."Originally published in single magazine format as the Walking dead, #1 - #6."...T.P. verso.ZombiesComic books, strips, etc.CannibalismComic books, strips, etc.Survival HorrorComic books, strips, etc.Post ApocalypticComic books, strips, etc.Horror comic books, strips, etc.gsafd.Comic books, strips, etc.gsafdGraphic novels.Moore, Tony.Rathburn, Cliff.Image Comics.684684biblio'), (:bib_tag,'02002cam a2200481 a 4500693CONS20130416180042.0100402s2010 nyu 000 f eng20100138939780345497499 (hardcover : alk. paper)034549749X (hardcover : alk. paper)(SC LENDS)1520630e-uk-enPR6063.I265K73 2010823/.91422FIC - MiéMiéville, China.Kraken :an anatomy /China Miéville.1st ed.New York :Del Rey/Ballantine Books,c2010.1006509 p. ;25 cm.Being chased by cults, a maniac, and the sorcerers of the Fundamentalist and Sect-Related Crime Unit, cephalopod specialist Billy Harrow inadvertently learns that he holds the key to finding a missing squid that went missing against all logic.Museum curatorsEnglandFiction.Giant squidsFiction.MagicFiction.CephalapodsFiction.CultsFiction.Weird Fiction, English.Comedy, English.Fantasy fiction.693693biblio'), (:bib_tag,'01872cjm a2200385 a 4500676CONS20130416175533.0940516s1994 nyumpn eng dsd zunznnmmneu9577384207567825192482519-2Atlantic(SC LENDS)1946843792.6 CROThe crow[sound recording] :original motion picture soundtrack.Music CDNew York :Atlantic Recording Corp.,p1994.1 sound disc :digital ;4 3/4 in.Various artists.Burn (the Cure) (6:39) -- Golgotha tenement blues (Machines of Loving Grace) (3:58) -- Big empty (Stone Temple Pilots) (4:55) -- Dead souls (Nine Inch Nails) (4:52) -- Darkness (Rage Against the Machine) (3:41) -- Color me once (Violent Femmes) (4:10) -- Ghostrider (Rollins Band) (5:44) -- Milktoast (Helmet) (3:59) -- The badge (Pantera) (3:53) -- Slip slide melting (For Love not Lisa) (5:45) -- After the flesh (My Life with the Thrill Kill Kult) (2:58) -- Snakedriver (the Jesus and Mary Chain) (3:39) -- Time baby III (Medicine) (3:50) -- It can''t rain all the time (Jane Siberry) (5:34).Motion picture music.Industrial music1991-2000.Grunge music1991-2000.Crow (Motion picture)676676biblio'), -(:bib_tag,'00456cam a2200181 a 4500675CONS20130416175204.0000515s1982 nyua 000 1 eng d0451115082(SCLENDS)656898FIC BACFIC/BACBachman, Richard.The running man /Richard Bachman.New York :Signet Book,c1982.219 p.Stephen King (writing as Richard Bachman) crafted The Running Man early in his career, though after such mega-hits as Carrie and The Shining. A bit of a departure from the supernatural horror that is most frequently associated with his work, the novel describes a science fiction dystopia where market capitalism and television game shows have spiraled out of control, and the separation between the haves and the have-nots has been formalized with separate currencies. King establishes characters quickly, creating sympathy in the first few pages for Ben Richards--whose 18-month-old baby girl is suffering from a horrible cough, perhaps pneumonia. Not able to afford medicine, Richards enters himself in the last-chance money-making scheme of the Free-Vee games. The games include Treadmill to Bucks, in which heart-attack prone contestants struggle to outlast a progressively demanding treadmill, or the accurately named Swim the Crocodiles. After a rigorous battery of physical and mental examinations, Richards is assigned "Elevator Six"--the path of a chosen few--that leads to The Running Man game. In this game, the stakes and the prizes are raised. Success means a life of luxury. Failure means death. Unfortunately, few ever win the game; in fact, as the producer tells Richards, in six years no one has survived.Horror tales, American.Adventure stories.Horror stories.King, Stephen.675675biblio'), -(:bib_tag,'00918nim a22002535 45002838534CARDINAL20131130185904.0sd|uungnnmmneu130904 eng 9781482926323 (CMD)$19.951482926326 (CMD)$19.95Blackstone Audio Inc, Special Markets Po Box 969, Ashland, OR, USA, 97520, (541)4886035SAN 173-2811UtOrBLW813813.0000Lovecraft, H. P./ Herrmann, Edward (NRT)At the Mountains of Madness[sound recording].[Place of publication not identified] :Blackstone Audio Inc,2013.spoken wordrdacontentaudiordamediaaudio discrdacarrier'), -(:bib_tag,'01423pam a2200373 a 45003079565CARDINAL20080108231100.0080108s2005 nyu b 001 1 eng 2005-0415550812974417 (pbk.) :$15.95(DLC)2005041555DLCDLCDLCt------813/.5222FLOVECRAFTLovecraft, H. P.(Howard Phillips),1890-1937.At the mountains of madness /H.P. Lovecraft ; introduction by China Mie ville.Definitive ed.New York :Modern Library,2005.xxv, 186 p. ;20 cm.MARCIVE 12/19/07Includes bibliographical references (p. xxiv-xxv) and index.At the mountains of madness -- Supernatural horror in literature.FossilsCollection and preservationFiction.Scientific expeditionsFiction.Supernatural in literature.Stone carvingFiction.AntarcticaFiction.Fantasy fiction.gsafdHorror fiction.gsafdLovecraft, H. P.(Howard Phillips),1890-1937.Supernatural horror in literature.'), -(:bib_tag,'01639nim a2200445 a 45004101339CARDINAL20140714090509.0sd fungnnmmned140709s2012 tnunnnn f n eng d9781843795940DD10435Recorded Books(CtWfDGI)rdd90010435CtWfDGIengCtWfDGIt------PS3523.O833A96 2012b813/.5223VLOVEAMMR 35Lovecraft, H. P.(Howard Phillips),1890-1937.At the mountains of madness[sound recording] /H.P. Lovecraft.Unabridged.Franklin, TN :Naxos AudioBooks ;Prince Frederick, MD :Distributed by Recorded Books,p2012.4 sound discs (5 hr.) :digital ;4 3/4 in.Title from container.Compact disc.In container (17 cm.).Read by William Roberts.An old man consents to a radio interview and a number of terrible truths are revealed about an expedition of Antarctica in the 1920's where everyone died horribly.Scientific expeditionsFiction.Stone carvingFiction.Supernatural in literature.FossilsCollection and preservationFiction.AntarcticaFiction.Horror fiction.gsafdFantasy fiction.gsafdAudiobooks.lcgftRoberts, William,1943-nrtNaxos AudioBooks, Ltd.Recorded Books, LLC.') +(:bib_tag,'00456cam a2200181 a 4500675CONS20130416175204.0000515s1982 nyua 000 1 eng d0451115082(SCLENDS)656898FIC BACFIC/BACBachman, Richard.The running man /Richard Bachman.New York :Signet Book,c1982.219 p.Stephen King (writing as Richard Bachman) crafted The Running Man early in his career, though after such mega-hits as Carrie and The Shining. A bit of a departure from the supernatural horror that is most frequently associated with his work, the novel describes a science fiction dystopia where market capitalism and television game shows have spiraled out of control, and the separation between the haves and the have-nots has been formalized with separate currencies. King establishes characters quickly, creating sympathy in the first few pages for Ben Richards--whose 18-month-old baby girl is suffering from a horrible cough, perhaps pneumonia. Not able to afford medicine, Richards enters himself in the last-chance money-making scheme of the Free-Vee games. The games include Treadmill to Bucks, in which heart-attack prone contestants struggle to outlast a progressively demanding treadmill, or the accurately named Swim the Crocodiles. After a rigorous battery of physical and mental examinations, Richards is assigned "Elevator Six"--the path of a chosen few--that leads to The Running Man game. In this game, the stakes and the prizes are raised. Success means a life of luxury. Failure means death. Unfortunately, few ever win the game; in fact, as the producer tells Richards, in six years no one has survived.Horror tales, American.Adventure stories.Horror stories.King, Stephen.675675biblio') ; diff --git a/Open-ILS/tests/datasets/sql/bibs_mr.sql b/Open-ILS/tests/datasets/sql/bibs_mr.sql new file mode 100644 index 0000000000..66c63102a9 --- /dev/null +++ b/Open-ILS/tests/datasets/sql/bibs_mr.sql @@ -0,0 +1,7 @@ + \set bib_tag '''IMPORT MR''' + +INSERT INTO marcxml_import (tag, marc) VALUES + +(:bib_tag,'00918nim a22002535 45002838534CARDINAL20131130185904.0sd|uungnnmmneu130904 eng 9781482926323 (CMD)$19.951482926326 (CMD)$19.95Blackstone Audio Inc, Special Markets Po Box 969, Ashland, OR, USA, 97520, (541)4886035SAN 173-2811UtOrBLW813813.0000Lovecraft, H. P./ Herrmann, Edward (NRT)At the Mountains of Madness[sound recording].[Place of publication not identified] :Blackstone Audio Inc,2013.spoken wordrdacontentaudiordamediaaudio discrdacarrier'), +(:bib_tag,'01423pam a2200373 a 45003079565CARDINAL20080108231100.0080108s2005 nyu b 001 1 eng 2005-0415550812974417 (pbk.) :$15.95(DLC)2005041555DLCDLCDLCt------813/.5222FLOVECRAFTLovecraft, H. P.(Howard Phillips),1890-1937.At the mountains of madness /H.P. Lovecraft ; introduction by China Mie ville.Definitive ed.New York :Modern Library,2005.xxv, 186 p. ;20 cm.MARCIVE 12/19/07Includes bibliographical references (p. xxiv-xxv) and index.At the mountains of madness -- Supernatural horror in literature.FossilsCollection and preservationFiction.Scientific expeditionsFiction.Supernatural in literature.Stone carvingFiction.AntarcticaFiction.Fantasy fiction.gsafdHorror fiction.gsafdLovecraft, H. P.(Howard Phillips),1890-1937.Supernatural horror in literature.'), +(:bib_tag,'01639nim a2200445 a 45004101339CARDINAL20140714090509.0sd fungnnmmned140709s2012 tnunnnn f n eng d9781843795940DD10435Recorded Books(CtWfDGI)rdd90010435CtWfDGIengCtWfDGIt------PS3523.O833A96 2012b813/.5223VLOVEAMMR 35Lovecraft, H. P.(Howard Phillips),1890-1937.At the mountains of madness[sound recording] /H.P. Lovecraft.Unabridged.Franklin, TN :Naxos AudioBooks ;Prince Frederick, MD :Distributed by Recorded Books,p2012.4 sound discs (5 hr.) :digital ;4 3/4 in.Title from container.Compact disc.In container (17 cm.).Read by William Roberts.An old man consents to a radio interview and a number of terrible truths are revealed about an expedition of Antarctica in the 1920's where everyone died horribly.Scientific expeditionsFiction.Stone carvingFiction.Supernatural in literature.FossilsCollection and preservationFiction.AntarcticaFiction.Horror fiction.gsafdFantasy fiction.gsafdAudiobooks.lcgftRoberts, William,1943-nrtNaxos AudioBooks, Ltd.Recorded Books, LLC.') diff --git a/Open-ILS/tests/datasets/sql/load_all.sql b/Open-ILS/tests/datasets/sql/load_all.sql index 54d4e55125..28ff6b54cf 100644 --- a/Open-ILS/tests/datasets/sql/load_all.sql +++ b/Open-ILS/tests/datasets/sql/load_all.sql @@ -33,6 +33,9 @@ BEGIN; -- 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) SELECT marc, tag FROM marcxml_import ORDER BY 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