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