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