]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/sql/Pg/002.schema.config.sql
be84525d1fe50440a51ab90e5c2906437924f14f
[Evergreen.git] / Open-ILS / src / sql / Pg / 002.schema.config.sql
1
2 DROP SCHEMA stats CASCADE;
3 DROP SCHEMA config CASCADE;
4
5 BEGIN;
6 CREATE SCHEMA stats;
7
8 CREATE SCHEMA config;
9 COMMENT ON SCHEMA config IS $$
10 /*
11  * Copyright (C) 2005  Georgia Public Library Service 
12  * Mike Rylander <mrylander@gmail.com>
13  *
14  * The config schema holds static configuration data for the
15  * Open-ILS installation.
16  *
17  * ****
18  *
19  * This program is free software; you can redistribute it and/or
20  * modify it under the terms of the GNU General Public License
21  * as published by the Free Software Foundation; either version 2
22  * of the License, or (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27  * GNU General Public License for more details.
28  */
29 $$;
30
31
32 CREATE TABLE config.bib_source (
33         id      SERIAL  PRIMARY KEY,
34         quality INT     CHECK ( quality BETWEEN 0 AND 100 ),
35         source  TEXT    NOT NULL UNIQUE
36 );
37 COMMENT ON TABLE config.bib_source IS $$
38 /*
39  * Copyright (C) 2005  Georgia Public Library Service 
40  * Mike Rylander <mrylander@gmail.com>
41  *
42  * Valid sources of MARC records
43  *
44  * This is table is used to set up the relative "quality" of each
45  * MARC source, such as OCLC.
46  *
47  * ****
48  *
49  * This program is free software; you can redistribute it and/or
50  * modify it under the terms of the GNU General Public License
51  * as published by the Free Software Foundation; either version 2
52  * of the License, or (at your option) any later version.
53  *
54  * This program is distributed in the hope that it will be useful,
55  * but WITHOUT ANY WARRANTY; without even the implied warranty of
56  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
57  * GNU General Public License for more details.
58  */
59 $$;
60
61
62 INSERT INTO config.bib_source (quality, source) VALUES (90, 'OcLC');
63 INSERT INTO config.bib_source (quality, source) VALUES (10, 'System Local');
64
65 CREATE TABLE config.standing (
66         id              SERIAL  PRIMARY KEY,
67         value           TEXT    NOT NULL UNIQUE
68 );
69 COMMENT ON TABLE config.standing IS $$
70 /*
71  * Copyright (C) 2005  Georgia Public Library Service 
72  * Mike Rylander <mrylander@gmail.com>
73  *
74  * Patron Standings
75  *
76  * This table contains the values that can be applied to a patron
77  * by a staff member.  These values should not be changed, other
78  * that for translation, as the ID column is currently a "magic
79  * number" in the source. :(
80  *
81  * ****
82  *
83  * This program is free software; you can redistribute it and/or
84  * modify it under the terms of the GNU General Public License
85  * as published by the Free Software Foundation; either version 2
86  * of the License, or (at your option) any later version.
87  *
88  * This program is distributed in the hope that it will be useful,
89  * but WITHOUT ANY WARRANTY; without even the implied warranty of
90  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
91  * GNU General Public License for more details.
92  */
93 $$;
94
95 INSERT INTO config.standing (value) VALUES ('Good');
96 INSERT INTO config.standing (value) VALUES ('Barred');
97
98
99
100 CREATE TABLE config.metabib_field (
101         id              SERIAL  PRIMARY KEY,
102         field_class     TEXT    NOT NULL CHECK (lower(field_class) IN ('title','author','subject','keyword','series')),
103         name            TEXT    NOT NULL UNIQUE,
104         xpath           TEXT    NOT NULL
105 );
106 COMMENT ON TABLE config.metabib_field IS $$
107 /*
108  * Copyright (C) 2005  Georgia Public Library Service 
109  * Mike Rylander <mrylander@gmail.com>
110  *
111  * XPath used for WoRMing
112  *
113  * This table contains the XPath used to chop up MODS into it's
114  * indexable parts.  Each XPath entry is named and assigned to
115  * a "class" of either title, subject, author, keyword or series.
116  * 
117  *
118  * ****
119  *
120  * This program is free software; you can redistribute it and/or
121  * modify it under the terms of the GNU General Public License
122  * as published by the Free Software Foundation; either version 2
123  * of the License, or (at your option) any later version.
124  *
125  * This program is distributed in the hope that it will be useful,
126  * but WITHOUT ANY WARRANTY; without even the implied warranty of
127  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
128  * GNU General Public License for more details.
129  */
130 $$;
131
132
133 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'series', 'seriestitle', $$//mods:mods/mods:relatedItem[@type="series"]/mods:titleInfo$$ );
134 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'title', 'abbreviated', $$//mods:mods/mods:titleInfo[mods:title and (@type='abreviated')]$$ );
135 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'title', 'translated', $$//mods:mods/mods:titleInfo[mods:title and (@type='translated')]$$ );
136 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'title', 'uniform', $$//mods:mods/mods:titleInfo[mods:title and (@type='uniform')]$$ );
137 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'title', 'proper', $$//mods:mods/mods:titleInfo[mods:title and not (@type)]$$ );
138 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'author', 'corporate', $$//mods:mods/mods:name[@type='corporate']/mods:namePart[../mods:role/mods:text[text()='creator']]$$ );
139 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'author', 'personal', $$//mods:mods/mods:name[@type='personal']/mods:namePart[../mods:role/mods:text[text()='creator']]$$ );
140 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'author', 'conference', $$//mods:mods/mods:name[@type='conference']/mods:namePart[../mods:role/mods:text[text()='creator']]$$ );
141 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'author', 'other', $$//mods:mods/mods:name[@type='personal']/mods:namePart[not(../mods:role)]$$ );
142 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'subject', 'geographic', $$//mods:mods/mods:subject/mods:geographic$$ );
143 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'subject', 'name', $$//mods:mods/mods:subject/mods:name$$ );
144 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'subject', 'temporal', $$//mods:mods/mods:subject/mods:temporal$$ );
145 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'subject', 'topic', $$//mods:mods/mods:subject/mods:topic$$ );
146 -- INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'subject', 'genre', $$//mods:mods/mods:genre$$ );
147 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'keyword', 'keyword', $$//mods:mods/*[not(local-name()='originInfo')]$$ ); -- /* to fool vim */
148
149 CREATE TABLE config.non_cataloged_type (
150         id              SERIAL  PRIMARY KEY,
151         owning_lib      INT     NOT NULL, -- REFERENCES actor.org_unit (id),
152         name            TEXT    NOT NULL UNIQUE
153 );
154 COMMENT ON TABLE config.non_cataloged_type IS $$
155 /*
156  * Copyright (C) 2005  Georgia Public Library Service 
157  * Mike Rylander <mrylander@gmail.com>
158  *
159  * Types of valid non-cataloged items.
160  *
161  *
162  * ****
163  *
164  * This program is free software; you can redistribute it and/or
165  * modify it under the terms of the GNU General Public License
166  * as published by the Free Software Foundation; either version 2
167  * of the License, or (at your option) any later version.
168  *
169  * This program is distributed in the hope that it will be useful,
170  * but WITHOUT ANY WARRANTY; without even the implied warranty of
171  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
172  * GNU General Public License for more details.
173  */
174 $$;
175
176
177 INSERT INTO config.non_cataloged_type ( owning_lib, name ) VALUES ( 1, 'Paperback Book' );
178
179 CREATE TABLE config.identification_type (
180         id              SERIAL  PRIMARY KEY,
181         name            TEXT    NOT NULL UNIQUE
182 );
183 COMMENT ON TABLE config.identification_type IS $$
184 /*
185  * Copyright (C) 2005  Georgia Public Library Service 
186  * Mike Rylander <mrylander@gmail.com>
187  *
188  * Types of valid patron identification.
189  *
190  * Each patron must display at least one valid form of identification
191  * in order to get a library card.  This table lists those forms.
192  * 
193  *
194  * ****
195  *
196  * This program is free software; you can redistribute it and/or
197  * modify it under the terms of the GNU General Public License
198  * as published by the Free Software Foundation; either version 2
199  * of the License, or (at your option) any later version.
200  *
201  * This program is distributed in the hope that it will be useful,
202  * but WITHOUT ANY WARRANTY; without even the implied warranty of
203  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
204  * GNU General Public License for more details.
205  */
206 $$;
207
208
209 INSERT INTO config.identification_type ( name ) VALUES ( 'Drivers Licence' );
210 INSERT INTO config.identification_type ( name ) VALUES ( 'Voter Card' );
211 INSERT INTO config.identification_type ( name ) VALUES ( 'Two Utility Bills' );
212 INSERT INTO config.identification_type ( name ) VALUES ( 'State ID' );
213 INSERT INTO config.identification_type ( name ) VALUES ( 'SSN' );
214
215 CREATE TABLE config.rule_circ_duration (
216         id              SERIAL          PRIMARY KEY,
217         name            TEXT            NOT NULL UNIQUE CHECK ( name ~ '^\\w+$' ),
218         extended        INTERVAL        NOT NULL,
219         normal          INTERVAL        NOT NULL,
220         shrt            INTERVAL        NOT NULL,
221         max_renewals    INT             NOT NULL
222 );
223 COMMENT ON TABLE config.rule_circ_duration IS $$
224 /*
225  * Copyright (C) 2005  Georgia Public Library Service 
226  * Mike Rylander <mrylander@gmail.com>
227  *
228  * Circulation Duration rules
229  *
230  * Each circulation is given a duration based on one of these rules.
231  * 
232  *
233  * ****
234  *
235  * This program is free software; you can redistribute it and/or
236  * modify it under the terms of the GNU General Public License
237  * as published by the Free Software Foundation; either version 2
238  * of the License, or (at your option) any later version.
239  *
240  * This program is distributed in the hope that it will be useful,
241  * but WITHOUT ANY WARRANTY; without even the implied warranty of
242  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
243  * GNU General Public License for more details.
244  */
245 $$;
246
247 INSERT INTO config.rule_circ_duration VALUES (DEFAULT, '2wk_default', '21 days', '14 days', '7 days', 2);
248
249
250 CREATE TABLE config.rule_max_fine (
251         id      SERIAL          PRIMARY KEY,
252         name    TEXT            NOT NULL UNIQUE CHECK ( name ~ '^\\w+$' ),
253         amount  NUMERIC(6,2)    NOT NULL
254 );
255 COMMENT ON TABLE config.rule_max_fine IS $$
256 /*
257  * Copyright (C) 2005  Georgia Public Library Service 
258  * Mike Rylander <mrylander@gmail.com>
259  *
260  * Circulation Max Fine rules
261  *
262  * Each circulation is given a maximum fine based on one of
263  * these rules.
264  * 
265  *
266  * ****
267  *
268  * This program is free software; you can redistribute it and/or
269  * modify it under the terms of the GNU General Public License
270  * as published by the Free Software Foundation; either version 2
271  * of the License, or (at your option) any later version.
272  *
273  * This program is distributed in the hope that it will be useful,
274  * but WITHOUT ANY WARRANTY; without even the implied warranty of
275  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
276  * GNU General Public License for more details.
277  */
278 $$;
279
280 INSERT INTO config.rule_max_fine VALUES (DEFAULT, 'books', 50.00);
281
282
283 CREATE TABLE config.rule_recuring_fine (
284         id                      SERIAL          PRIMARY KEY,
285         name                    TEXT            NOT NULL UNIQUE CHECK ( name ~ '^\\w+$' ),
286         high                    NUMERIC(6,2)    NOT NULL,
287         normal                  NUMERIC(6,2)    NOT NULL,
288         low                     NUMERIC(6,2)    NOT NULL,
289         recurance_interval      INTERVAL        NOT NULL DEFAULT '1 day'::INTERVAL
290 );
291 COMMENT ON TABLE config.rule_recuring_fine IS $$
292 /*
293  * Copyright (C) 2005  Georgia Public Library Service 
294  * Mike Rylander <mrylander@gmail.com>
295  *
296  * Circulation Recuring Fine rules
297  *
298  * Each circulation is given a recuring fine amount based on one of
299  * these rules.  The recurance_interval should not be any shorter
300  * than the interval between runs of the fine_processor.pl script
301  * (which is run from CRON), or you could miss fines.
302  * 
303  *
304  * ****
305  *
306  * This program is free software; you can redistribute it and/or
307  * modify it under the terms of the GNU General Public License
308  * as published by the Free Software Foundation; either version 2
309  * of the License, or (at your option) any later version.
310  *
311  * This program is distributed in the hope that it will be useful,
312  * but WITHOUT ANY WARRANTY; without even the implied warranty of
313  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
314  * GNU General Public License for more details.
315  */
316 $$;
317
318 INSERT INTO config.rule_recuring_fine VALUES (1, 'books', 0.50, 0.10, 0.10, '1 day');
319
320
321 CREATE TABLE config.rule_age_hold_protect (
322         id      SERIAL          PRIMARY KEY,
323         name    TEXT            NOT NULL UNIQUE CHECK ( name ~ '^\\w+$' ),
324         age     INTERVAL        NOT NULL,
325         prox    INT             NOT NULL
326 );
327 COMMENT ON TABLE config.rule_age_hold_protect IS $$
328 /*
329  * Copyright (C) 2005  Georgia Public Library Service 
330  * Mike Rylander <mrylander@gmail.com>
331  *
332  * Hold Item Age Protection rules
333  *
334  * A hold request can only capture new(ish) items when they are
335  * within a particular proximity of the home_ou of the requesting
336  * user.  The proximity ('prox' column) is calculated by counting
337  * the number of tree edges beween the user's home_ou and the owning_lib
338  * of the copy that could fulfill the hold.
339  * 
340  *
341  * ****
342  *
343  * This program is free software; you can redistribute it and/or
344  * modify it under the terms of the GNU General Public License
345  * as published by the Free Software Foundation; either version 2
346  * of the License, or (at your option) any later version.
347  *
348  * This program is distributed in the hope that it will be useful,
349  * but WITHOUT ANY WARRANTY; without even the implied warranty of
350  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
351  * GNU General Public License for more details.
352  */
353 $$;
354
355 INSERT INTO config.rule_age_hold_protect VALUES (DEFAULT, '3month', '3 mons', 0);
356 INSERT INTO config.rule_age_hold_protect VALUES (DEFAULT, '6month', '6 mons', 2);
357
358
359 CREATE TABLE config.copy_status (
360         id              SERIAL  PRIMARY KEY,
361         name            TEXT    NOT NULL UNIQUE,
362         holdable        BOOL    NOT NULL DEFAULT FALSE
363 );
364 COMMENT ON TABLE config.copy_status IS $$
365 /*
366  * Copyright (C) 2005  Georgia Public Library Service 
367  * Mike Rylander <mrylander@gmail.com>
368  *
369  * Copy Statuses
370  *
371  * The available copy statuses, and whether a copy in that
372  * status is available for hold request capture.  0 (zero) is
373  * the only special number in this set, meaning that the item
374  * is available for imediate checkout, and is counted as available
375  * in the OPAC.
376  *
377  * Statuses with an ID below 100 are not removable, and have special
378  * meaning in the code.  Do not change them except to translate the
379  * textual name.
380  *
381  * You may add and remove statuses above 100, and these can be used
382  * to remove items from normal circulation without affecting the rest
383  * of the copy's values or it's location.
384  *
385  * ****
386  *
387  * This program is free software; you can redistribute it and/or
388  * modify it under the terms of the GNU General Public License
389  * as published by the Free Software Foundation; either version 2
390  * of the License, or (at your option) any later version.
391  *
392  * This program is distributed in the hope that it will be useful,
393  * but WITHOUT ANY WARRANTY; without even the implied warranty of
394  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
395  * GNU General Public License for more details.
396  */
397 $$;
398
399 INSERT INTO config.copy_status (id,name,holdable)       VALUES (0,'Available','t');
400 INSERT INTO config.copy_status (name,holdable)          VALUES ('Checked out','t');
401 INSERT INTO config.copy_status (name)                   VALUES ('Bindery');
402 INSERT INTO config.copy_status (name)                   VALUES ('Lost');
403 INSERT INTO config.copy_status (name)                   VALUES ('Missing');
404 INSERT INTO config.copy_status (name,holdable)          VALUES ('In process','t');
405 INSERT INTO config.copy_status (name,holdable)          VALUES ('In transit','t');
406 INSERT INTO config.copy_status (name,holdable)          VALUES ('Reshelving','t');
407 INSERT INTO config.copy_status (name)                   VALUES ('On holds shelf');
408 INSERT INTO config.copy_status (name,holdable)          VALUES ('On order','t');
409 INSERT INTO config.copy_status (name)                   VALUES ('ILL');
410 INSERT INTO config.copy_status (name)                   VALUES ('Cataloging');
411 INSERT INTO config.copy_status (name)                   VALUES ('Reserves');
412 INSERT INTO config.copy_status (name)                   VALUES ('Discard/Weed');
413
414 SELECT SETVAL('config.copy_status_id_seq'::TEXT, 100);
415
416
417 CREATE TABLE config.net_access_level (
418         id      SERIAL          PRIMARY KEY,
419         name    TEXT            NOT NULL UNIQUE
420 );
421 COMMENT ON TABLE config.net_access_level IS $$
422 /*
423  * Copyright (C) 2005  Georgia Public Library Service 
424  * Mike Rylander <mrylander@gmail.com>
425  *
426  * Patron Network Access level
427  *
428  * This will be used to inform the in-library firewall of how much
429  * internet access the using patron should be allowed.
430  *
431  * ****
432  *
433  * This program is free software; you can redistribute it and/or
434  * modify it under the terms of the GNU General Public License
435  * as published by the Free Software Foundation; either version 2
436  * of the License, or (at your option) any later version.
437  *
438  * This program is distributed in the hope that it will be useful,
439  * but WITHOUT ANY WARRANTY; without even the implied warranty of
440  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
441  * GNU General Public License for more details.
442  */
443 $$;
444
445 INSERT INTO config.net_access_level (name) VALUES ('Restricted');
446 INSERT INTO config.net_access_level (name) VALUES ('Full');
447 INSERT INTO config.net_access_level (name) VALUES ('None');
448
449 CREATE TABLE config.language_map (
450         code    TEXT    PRIMARY KEY,
451         value   TEXT    NOT NULL
452 );
453
454 COPY config.language_map FROM STDIN;
455 aar     Afar
456 abk     Abkhaz
457 ace     Achinese
458 ach     Acoli
459 ada     Adangme
460 ady     Adygei
461 afa     Afroasiatic (Other)
462 afh     Afrihili (Artificial language)
463 afr     Afrikaans
464 -ajm    Aljamía
465 aka     Akan
466 akk     Akkadian
467 alb     Albanian
468 ale     Aleut
469 alg     Algonquian (Other)
470 amh     Amharic
471 ang     English, Old (ca. 450-1100)
472 apa     Apache languages
473 ara     Arabic
474 arc     Aramaic
475 arg     Aragonese Spanish
476 arm     Armenian
477 arn     Mapuche
478 arp     Arapaho
479 art     Artificial (Other)
480 arw     Arawak
481 asm     Assamese
482 ast     Bable
483 ath     Athapascan (Other)
484 aus     Australian languages
485 ava     Avaric
486 ave     Avestan
487 awa     Awadhi
488 aym     Aymara
489 aze     Azerbaijani
490 bad     Banda
491 bai     Bamileke languages
492 bak     Bashkir
493 bal     Baluchi
494 bam     Bambara
495 ban     Balinese
496 baq     Basque
497 bas     Basa
498 bat     Baltic (Other)
499 bej     Beja
500 bel     Belarusian
501 bem     Bemba
502 ben     Bengali
503 ber     Berber (Other)
504 bho     Bhojpuri
505 bih     Bihari
506 bik     Bikol
507 bin     Edo
508 bis     Bislama
509 bla     Siksika
510 bnt     Bantu (Other)
511 bos     Bosnian
512 bra     Braj
513 bre     Breton
514 btk     Batak
515 bua     Buriat
516 bug     Bugis
517 bul     Bulgarian
518 bur     Burmese
519 cad     Caddo
520 cai     Central American Indian (Other)
521 -cam    Khmer
522 car     Carib
523 cat     Catalan
524 cau     Caucasian (Other)
525 ceb     Cebuano
526 cel     Celtic (Other)
527 cha     Chamorro
528 chb     Chibcha
529 che     Chechen
530 chg     Chagatai
531 chi     Chinese
532 chk     Truk
533 chm     Mari
534 chn     Chinook jargon
535 cho     Choctaw
536 chp     Chipewyan
537 chr     Cherokee
538 chu     Church Slavic
539 chv     Chuvash
540 chy     Cheyenne
541 cmc     Chamic languages
542 cop     Coptic
543 cor     Cornish
544 cos     Corsican
545 cpe     Creoles and Pidgins, English-based (Other)
546 cpf     Creoles and Pidgins, French-based (Other)
547 cpp     Creoles and Pidgins, Portuguese-based (Other)
548 cre     Cree
549 crh     Crimean Tatar
550 crp     Creoles and Pidgins (Other)
551 cus     Cushitic (Other)
552 cze     Czech
553 dak     Dakota
554 dan     Danish
555 dar     Dargwa
556 day     Dayak
557 del     Delaware
558 den     Slave
559 dgr     Dogrib
560 din     Dinka
561 div     Divehi
562 doi     Dogri
563 dra     Dravidian (Other)
564 dua     Duala
565 dum     Dutch, Middle (ca. 1050-1350)
566 dut     Dutch
567 dyu     Dyula
568 dzo     Dzongkha
569 efi     Efik
570 egy     Egyptian
571 eka     Ekajuk
572 elx     Elamite
573 eng     English
574 enm     English, Middle (1100-1500)
575 epo     Esperanto
576 -esk    Eskimo languages
577 -esp    Esperanto
578 est     Estonian
579 -eth    Ethiopic
580 ewe     Ewe
581 ewo     Ewondo
582 fan     Fang
583 fao     Faroese
584 -far    Faroese
585 fat     Fanti
586 fij     Fijian
587 fin     Finnish
588 fiu     Finno-Ugrian (Other)
589 fon     Fon
590 fre     French
591 -fri    Frisian
592 frm     French, Middle (ca. 1400-1600)
593 fro     French, Old (ca. 842-1400)
594 fry     Frisian
595 ful     Fula
596 fur     Friulian
597 gaa     Gã
598 -gae    Scottish Gaelic
599 -gag    Galician
600 -gal    Oromo
601 gay     Gayo
602 gba     Gbaya
603 gem     Germanic (Other)
604 geo     Georgian
605 ger     German
606 gez     Ethiopic
607 gil     Gilbertese
608 gla     Scottish Gaelic
609 gle     Irish
610 glg     Galician
611 glv     Manx
612 gmh     German, Middle High (ca. 1050-1500)
613 goh     German, Old High (ca. 750-1050)
614 gon     Gondi
615 gor     Gorontalo
616 got     Gothic
617 grb     Grebo
618 grc     Greek, Ancient (to 1453)
619 gre     Greek, Modern (1453- )
620 grn     Guarani
621 -gua    Guarani
622 guj     Gujarati
623 gwi     Gwich'in
624 hai     Haida
625 hat     Haitian French Creole
626 hau     Hausa
627 haw     Hawaiian
628 heb     Hebrew
629 her     Herero
630 hil     Hiligaynon
631 him     Himachali
632 hin     Hindi
633 hit     Hittite
634 hmn     Hmong
635 hmo     Hiri Motu
636 hun     Hungarian
637 hup     Hupa
638 iba     Iban
639 ibo     Igbo
640 ice     Icelandic
641 ido     Ido
642 iii     Sichuan Yi
643 ijo     Ijo
644 iku     Inuktitut
645 ile     Interlingue
646 ilo     Iloko
647 ina     Interlingua (International Auxiliary Language Association)
648 inc     Indic (Other)
649 ind     Indonesian
650 ine     Indo-European (Other)
651 inh     Ingush
652 -int    Interlingua (International Auxiliary Language Association)
653 ipk     Inupiaq
654 ira     Iranian (Other)
655 -iri    Irish
656 iro     Iroquoian (Other)
657 ita     Italian
658 jav     Javanese
659 jpn     Japanese
660 jpr     Judeo-Persian
661 jrb     Judeo-Arabic
662 kaa     Kara-Kalpak
663 kab     Kabyle
664 kac     Kachin
665 kal     Kalâtdlisut
666 kam     Kamba
667 kan     Kannada
668 kar     Karen
669 kas     Kashmiri
670 kau     Kanuri
671 kaw     Kawi
672 kaz     Kazakh
673 kbd     Kabardian
674 kha     Khasi
675 khi     Khoisan (Other)
676 khm     Khmer
677 kho     Khotanese
678 kik     Kikuyu
679 kin     Kinyarwanda
680 kir     Kyrgyz
681 kmb     Kimbundu
682 kok     Konkani
683 kom     Komi
684 kon     Kongo
685 kor     Korean
686 kos     Kusaie
687 kpe     Kpelle
688 kro     Kru
689 kru     Kurukh
690 kua     Kuanyama
691 kum     Kumyk
692 kur     Kurdish
693 -kus    Kusaie
694 kut     Kutenai
695 lad     Ladino
696 lah     Lahnda
697 lam     Lamba
698 -lan    Occitan (post-1500)
699 lao     Lao
700 -lap    Sami
701 lat     Latin
702 lav     Latvian
703 lez     Lezgian
704 lim     Limburgish
705 lin     Lingala
706 lit     Lithuanian
707 lol     Mongo-Nkundu
708 loz     Lozi
709 ltz     Letzeburgesch
710 lua     Luba-Lulua
711 lub     Luba-Katanga
712 lug     Ganda
713 lui     Luiseño
714 lun     Lunda
715 luo     Luo (Kenya and Tanzania)
716 lus     Lushai
717 mac     Macedonian
718 mad     Madurese
719 mag     Magahi
720 mah     Marshallese
721 mai     Maithili
722 mak     Makasar
723 mal     Malayalam
724 man     Mandingo
725 mao     Maori
726 map     Austronesian (Other)
727 mar     Marathi
728 mas     Masai
729 -max    Manx
730 may     Malay
731 mdr     Mandar
732 men     Mende
733 mga     Irish, Middle (ca. 1100-1550)
734 mic     Micmac
735 min     Minangkabau
736 mis     Miscellaneous languages
737 mkh     Mon-Khmer (Other)
738 -mla    Malagasy
739 mlg     Malagasy
740 mlt     Maltese
741 mnc     Manchu
742 mni     Manipuri
743 mno     Manobo languages
744 moh     Mohawk
745 mol     Moldavian
746 mon     Mongolian
747 mos     Mooré
748 mul     Multiple languages
749 mun     Munda (Other)
750 mus     Creek
751 mwr     Marwari
752 myn     Mayan languages
753 nah     Nahuatl
754 nai     North American Indian (Other)
755 nap     Neapolitan Italian
756 nau     Nauru
757 nav     Navajo
758 nbl     Ndebele (South Africa)
759 nde     Ndebele (Zimbabwe)  
760 ndo     Ndonga
761 nds     Low German
762 nep     Nepali
763 new     Newari
764 nia     Nias
765 nic     Niger-Kordofanian (Other)
766 niu     Niuean
767 nno     Norwegian (Nynorsk)
768 nob     Norwegian (Bokmål)
769 nog     Nogai
770 non     Old Norse
771 nor     Norwegian
772 nso     Northern Sotho
773 nub     Nubian languages
774 nya     Nyanja
775 nym     Nyamwezi
776 nyn     Nyankole
777 nyo     Nyoro
778 nzi     Nzima
779 oci     Occitan (post-1500)
780 oji     Ojibwa
781 ori     Oriya
782 orm     Oromo
783 osa     Osage
784 oss     Ossetic
785 ota     Turkish, Ottoman
786 oto     Otomian languages
787 paa     Papuan (Other)
788 pag     Pangasinan
789 pal     Pahlavi
790 pam     Pampanga
791 pan     Panjabi
792 pap     Papiamento
793 pau     Palauan
794 peo     Old Persian (ca. 600-400 B.C.)
795 per     Persian
796 phi     Philippine (Other)
797 phn     Phoenician
798 pli     Pali
799 pol     Polish
800 pon     Ponape
801 por     Portuguese
802 pra     Prakrit languages
803 pro     Provençal (to 1500)
804 pus     Pushto
805 que     Quechua
806 raj     Rajasthani
807 rap     Rapanui
808 rar     Rarotongan
809 roa     Romance (Other)
810 roh     Raeto-Romance
811 rom     Romani
812 rum     Romanian
813 run     Rundi
814 rus     Russian
815 sad     Sandawe
816 sag     Sango (Ubangi Creole)
817 sah     Yakut
818 sai     South American Indian (Other)
819 sal     Salishan languages
820 sam     Samaritan Aramaic
821 san     Sanskrit
822 -sao    Samoan
823 sas     Sasak
824 sat     Santali
825 scc     Serbian
826 sco     Scots
827 scr     Croatian
828 sel     Selkup
829 sem     Semitic (Other)
830 sga     Irish, Old (to 1100)
831 sgn     Sign languages
832 shn     Shan
833 -sho    Shona
834 sid     Sidamo
835 sin     Sinhalese
836 sio     Siouan (Other)
837 sit     Sino-Tibetan (Other)
838 sla     Slavic (Other)
839 slo     Slovak
840 slv     Slovenian
841 sma     Southern Sami
842 sme     Northern Sami
843 smi     Sami
844 smj     Lule Sami
845 smn     Inari Sami
846 smo     Samoan
847 sms     Skolt Sami
848 sna     Shona
849 snd     Sindhi
850 -snh    Sinhalese
851 snk     Soninke
852 sog     Sogdian
853 som     Somali
854 son     Songhai
855 sot     Sotho
856 spa     Spanish
857 srd     Sardinian
858 srr     Serer
859 ssa     Nilo-Saharan (Other)
860 -sso    Sotho
861 ssw     Swazi
862 suk     Sukuma
863 sun     Sundanese
864 sus     Susu
865 sux     Sumerian
866 swa     Swahili
867 swe     Swedish
868 -swz    Swazi
869 syr     Syriac
870 -tag    Tagalog
871 tah     Tahitian
872 tai     Tai (Other)
873 -taj    Tajik
874 tam     Tamil
875 -tar    Tatar
876 tat     Tatar
877 tel     Telugu
878 tem     Temne
879 ter     Terena
880 tet     Tetum
881 tgk     Tajik
882 tgl     Tagalog
883 tha     Thai
884 tib     Tibetan
885 tig     Tigré
886 tir     Tigrinya
887 tiv     Tiv
888 tkl     Tokelauan
889 tli     Tlingit
890 tmh     Tamashek
891 tog     Tonga (Nyasa)
892 ton     Tongan
893 tpi     Tok Pisin
894 -tru    Truk
895 tsi     Tsimshian
896 tsn     Tswana
897 tso     Tsonga
898 -tsw    Tswana
899 tuk     Turkmen
900 tum     Tumbuka
901 tup     Tupi languages
902 tur     Turkish
903 tut     Altaic (Other)
904 tvl     Tuvaluan
905 twi     Twi
906 tyv     Tuvinian
907 udm     Udmurt
908 uga     Ugaritic
909 uig     Uighur
910 ukr     Ukrainian
911 umb     Umbundu
912 und     Undetermined
913 urd     Urdu
914 uzb     Uzbek
915 vai     Vai
916 ven     Venda
917 vie     Vietnamese
918 vol     Volapük
919 vot     Votic
920 wak     Wakashan languages
921 wal     Walamo
922 war     Waray
923 was     Washo
924 wel     Welsh
925 wen     Sorbian languages
926 wln     Walloon
927 wol     Wolof
928 xal     Kalmyk
929 xho     Xhosa
930 yao     Yao (Africa)
931 yap     Yapese
932 yid     Yiddish
933 yor     Yoruba
934 ypk     Yupik languages
935 zap     Zapotec
936 zen     Zenaga
937 zha     Zhuang
938 znd     Zande
939 zul     Zulu
940 zun     Zuni
941 \.
942
943 CREATE TABLE config.item_form_map (
944         code    TEXT    PRIMARY KEY,
945         value   TEXT    NOT NULL
946 );
947
948 COPY config.item_form_map FROM STDIN;
949 a       Microfilm
950 b       Microfiche
951 c       Microopaque
952 d       Large print
953 f       Braille
954 r       Regular print reproduction
955 s       Electronic
956 \.
957
958 CREATE TABLE config.item_type_map (
959         code    TEXT    PRIMARY KEY,
960         value   TEXT    NOT NULL
961 );
962
963 COPY config.item_type_map FROM STDIN;
964 a       Language material
965 t       Manuscript language material
966 g       Projected medium
967 k       Two-dimensional nonprojectable graphic
968 r       Three-dimensional artifact or naturally occurring object
969 o       Kit
970 p       Mixed materials
971 e       Cartographic material
972 f       Manuscript cartographic material
973 c       Notated music
974 d       Manuscript notated music
975 i       Nonmusical sound recording
976 j       Musical sound recording
977 m       Computer file
978 \.
979
980 COMMIT;
981