-- *******************************************************
--   KOHA  MARC 21 STANDARD DEFAULT AUTHORITY FRAMEWORKS
--
--        Revised to Update No. 17 (September 2013)
-- *******************************************************

-- ******************************************************
-- KOHA DEFAULT MARC 21 AUTHORITY TYPE.
-- ******************************************************

-- This authority type includes all fields and subfieds used by any
-- authority type.

INSERT INTO auth_types (authtypecode, authtypetext, auth_tag_to_report, summary) VALUES
		('', 'Default', '', '');


-- ******************************************************
-- KOHA SUPPORTED STANDARD MARC 21 AUTHORITY TYPES.
-- ******************************************************

-- These authority types are supported for for guiding the cataloguer to
-- fill authorised values in Koha MARC bibliographic editor.


INSERT INTO auth_types (authtypecode, authtypetext, auth_tag_to_report, summary) VALUES
		('PERSO_NAME', 'Personal Name', '100', 'Personal Names'),
		('CORPO_NAME', 'Corporate Name', '110', 'Corporate Names'),
		('MEETI_NAME', 'Meeting Name', '111', 'Meeting Name'),
		('UNIF_TITLE', 'Uniform Title', '130', 'Uniform Title'),
		('CHRON_TERM', 'Chronological Term', '148', 'Chronological Term'),
		('TOPIC_TERM', 'Topical Term', '150', 'Topical Term'),
		('GEOGR_NAME', 'Geographic Name', '151', 'Geographic Name'),
		('GENRE/FORM', 'Genre/Form Term', '155', 'Genre/Form Term');


-- ******************************************************
-- KOHA UNSUPPORTED STANDARD MARC 21 AUTHORITY TYPES.
-- ******************************************************

-- These authority types are only supported for guiding the cataloguer to
-- fill authorised values in the Koha MARC bibliographic editor to the
-- extent that they have already been included in a primary authority type,
-- therefore, they have not yet been specified.
--
-- Minimal primary authorities including subdivisions may currently be
-- built by a script which uses the values in bibliographic records but
-- include no tracings and references which are necessarily not present
-- in bibliographic records.


-- INSERT INTO `auth_types` (`authtypecode`, `authtypetext`, `auth_tag_to_report`, `summary`) VALUES
--		('TOPIC_SUBD', 'General Topical Term Subdivision', '180', 'General Topical Term Subdivision'),
--		('GEOGR_SUBD', 'Geographic Subdivision', '181', 'Geographic Subdivision'),
--		('CHRON_SUBD', 'Chronological Subdivision', '182', 'Chronological Subdivision'),
--		('FORM_SUBDI', 'Form Subdivision', '185', 'Form Subdivision');



-- *****************************************************************
-- MARC 21 AUTHORITY FIELDS/SUBFIELDS AND COMMMONLY USED EXTENSIONS
-- *****************************************************************


-- No support for subfield visibility is yet provided by the Koha code
-- matching the column name 'hidden' in the bibliographic framework.
--
-- Needs checking for errors but probably tolerable for use on a production.
-- A server can be upgraded easily from later versions of this file.
--
-- In the absense of more column support for qualifying the relative
-- importance of subfields to the record editor, some modest modification of
-- the default framework is needed setting the not-useful non-Koha holdings
-- subfields to not managed in Koha.

-- MARC fields including letters as part of the field identifier are from RLIN
-- and should be expected to remain along with RLIN $% subfields.  RLIN has
-- been using letters in fields because there are not enough local use number
-- fields which have not already been specified for very large union catalogue
-- networks such as RLIN itself.

-- Fields ending in a or b are temporary placeholders for information from
-- a numeric value until a non-conflicting way to treat the content under the
-- proper original numeric field is adopted.  090 for LC call numbers is much
-- too common and important so 999 is also provided as a temporary place
-- holder until all Koha code for finding control fields has been changed from
-- a numeric test of < 10 to a regular expression match of m/^00/ to prevent
-- mistaken matching of fields with letters such as 09o if they were control
-- fields.

-- Fields and subfields which belong exclusively in a classification
-- framework have been marked '[CLASSIFICATION FRAMEWORK]'.  They are retained
-- or included here becuase some had been included previously and Koha does
-- not yet have a classification framework.


INSERT INTO `auth_tag_structure` (`authtypecode`, `tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`) VALUES
		('', '000', 'LEADER', 'LEADER', 0, 1, NULL),
		('', '001', 'CONTROL NUMBER', 'CONTROL NUMBER', 0, 1, NULL),
		('', '003', 'CONTROL NUMBER IDENTIFIER', 'CONTROL NUMBER IDENTIFIER', 0, 1, NULL),
		('', '005', 'DATE AND TIME OF LATEST TRANSACTION', 'DATE AND TIME OF LATEST TRANSACTION', 0, 1, NULL),
		('', '008', 'FIXED-LENGTH DATA ELEMENTS', 'FIXED-LENGTH DATA ELEMENTS', 0, 1, NULL),
		('', '010', 'LIBRARY OF CONGRESS CONTROL NUMBER', 'LIBRARY OF CONGRESS CONTROL NUMBER', 0, 0, NULL),
		('', '014', 'LINK TO BIBLIOGRAPHIC RECORD FOR SERIAL OR MULTIPART ITEM', 'LINK TO BIBLIOGRAPHIC RECORD FOR SERIAL OR MULTIPART ITEM', 1, 0, NULL),
		('', '016', 'NATIONAL BIBLIOGRAPHIC AGENCY CONTROL NUMBER', 'NATIONAL BIBLIOGRAPHIC AGENCY CONTROL NUMBER', 1, 0, NULL),
		('', '020', 'INTERNATIONAL STANDARD BOOK NUMBER', 'INTERNATIONAL STANDARD BOOK NUMBER', 1, 0, NULL),
		('', '022', 'INTERNATIONAL STANDARD SERIAL NUMBER', 'INTERNATIONAL STANDARD SERIAL NUMBER', 1, 0, NULL),
		('', '024', 'OTHER STANDARD IDENTIFIER', 'OTHER STANDARD IDENTIFIER', 1, 0, NULL),
		('', '031', 'MUSICAL INCIPITS INFORMATION', 'MUSICAL INCIPITS INFORMATION', 1, 0, NULL),
		('', '034', 'CODED CARTOGRAPHIC MATHEMATICAL DATA', 'CODED CARTOGRAPHIC MATHEMATICAL DATA', 1, 0, NULL),
		('', '035', 'SYSTEM CONTROL NUMBER', 'SYSTEM CONTROL NUMBER', 1, 0, NULL),
		('', '040', 'CATALOGING SOURCE', 'CATALOGING SOURCE', 0, 1, NULL),
		('', '042', 'AUTHENTICATION CODE', 'AUTHENTICATION CODE', 0, 0, NULL),
		('', '043', 'GEOGRAPHIC AREA CODE', 'GEOGRAPHIC AREA CODE', 0, 0, NULL),
		('', '045', 'TIME PERIOD OF HEADING', 'TIME PERIOD OF HEADING', 0, 0, NULL),
		('', '046', 'SPECIAL CODED DATES', 'SPECIAL CODED DATES', 1, 0, NULL),
		('', '050', 'LIBRARY OF CONGRESS CALL NUMBER', 'LIBRARY OF CONGRESS CALL NUMBER', 1, 0, NULL),
		('', '052', 'GEOGRAPHIC CLASSIFICATION', 'GEOGRAPHIC CLASSIFICATION', 1, 0, NULL),
		('', '053', 'LC CLASSIFICATION NUMBER', 'LC CLASSIFICATION NUMBER', 1, 0, NULL),
		('', '055', 'LIBRARY AND ARCHIVES CANADA CALL NUMBER', 'LIBRARY AND ARCHIVES CANADA CALL NUMBER', 1, 0, NULL),
		('', '058', 'LC CLASSIFICATION NUMBER ASSIGNED IN CANADA [OBSOLETE, CAN/MARC]', 'LC CLASSIFICATION NUMBER ASSIGNED IN CANADA [OBSOLETE, CAN/MARC]', 1, 0, NULL),
		('', '060', 'NATIONAL LIBRARY OF MEDICINE CALL NUMBER', 'NATIONAL LIBRARY OF MEDICINE CALL NUMBER', 1, 0, NULL),
		('', '063', 'NLM CLASSIFICATION NUMBER ASSIGNED BY NLM [OBSOLETE, CAN/MARC]', 'NLM CLASSIFICATION NUMBER ASSIGNED BY NLM [OBSOLETE, CAN/MARC]', 1, 0, NULL),
		('', '065', 'OTHER CLASSIFICATION NUMBER', 'OTHER CLASSIFICATION NUMBER', 1, 0, NULL),
		('', '066', 'CHARACTER SETS PRESENT', 'CHARACTER SETS PRESENT', 0, 0, NULL),
		('', '068', 'NLM CLASSIFICATION NUMBER ASSIGNED IN CANADA [OBSOLETE, CAN/MARC]', 'NLM CLASSIFICATION NUMBER ASSIGNED IN CANADA [OBSOLETE, CAN/MARC]', 1, 0, NULL),
		('', '070', 'NATIONAL AGRICULTURAL LIBRARY CALL NUMBER', 'NATIONAL AGRICULTURAL LIBRARY CALL NUMBER', 1, 0, NULL),
		('', '072', 'SUBJECT CATEGORY CODE', 'SUBJECT CATEGORY CODE', 1, 0, NULL),
		('', '073', 'SUBDIVISION USAGE', 'SUBDIVISION USAGE', 0, 0, NULL),
		('', '080', 'UNIVERSAL DECIMAL CLASSIFICATION NUMBER', 'UNIVERSAL DECIMAL CLASSIFICATION NUMBER', 1, 0, NULL),
		('', '082', 'DEWEY DECIMAL CALL NUMBER', 'DEWEY DECIMAL CALL NUMBER', 1, 0, NULL),
		('', '083', 'DEWEY DECIMAL CLASSIFICATION NUMBER', 'DEWEY DECIMAL CLASSIFICATION NUMBER', 1, 0, NULL),
		('', '084', 'CLASSIFICATION SCHEME AND EDITION [CLASSIFICATION FORMAT]', 'CLASSIFICATION SCHEME AND EDITION [CLASSIFICATION FORMAT]', 0, 0, NULL),
		('', '086', 'GOVERNMENT DOCUMENT CALL NUMBER', 'GOVERNMENT DOCUMENT CALL NUMBER', 1, 0, NULL),
		('', '087', 'GOVERNMENT DOCUMENT CLASSIFICATION NUMBER', 'GOVERNMENT DOCUMENT CLASSIFICATION NUMBER', 1, 0, NULL),
		('', '088', 'DOCUMENT SHELVING NUMBER (CODOC) [OBSOLETE, CAN/MARC]', 'DOCUMENT SHELVING NUMBER (CODOC) [OBSOLETE, CAN/MARC]', 1, 0, NULL),
		('', '090', 'LOCAL CALL NUMBER (SERIES) [OBSOLETE]; LOCALLY ASSIGNED LC-TYPE CALL NUMBER (OCLC); LOCAL CALL NUMBER (RLIN)', 'LOCAL CALL NUMBER (SERIES) [OBSOLETE]; LOCALLY ASSIGNED LC-TYPE CALL NUMBER (OCLC); LOCAL CALL NUMBER (OCLC)', 1, 0, NULL),
		('', '091', 'LOCALLY ASSIGNED LC-TYPE CLASSIFICATION NUMBER (OCLC); LOCAL CLASSIFICATION NUMBER (RLIN)', 'LOCALLY ASSIGNED LC-TYPE CLASSIFICATION NUMBER (OCLC); LOCAL CLASSIFICATION NUMBER (RLIN)', 0, 0, NULL),
		('', '092', 'LOCALLY ASSIGNED DEWEY CALL NUMBER (OCLC)', 'LOCALLY ASSIGNED DEWEY CALL NUMBER (OCLC)', 1, 0, NULL),
		('', '093', 'LOCALLY ASSIGNED DEWEY CLASSIFICATION NUMBER (OCLC)', 'LOCALLY ASSIGNED DEWEY CLASSIFICATION NUMBER (OCLC)', 1, 0, NULL),
		('', '096', 'LOCALLY ASSIGNED NLM-TYPE CALL NUMBER (OCLC)', 'LOCALLY ASSIGNED NLM-TYPE CALL NUMBER (OCLC)', 1, 0, NULL),
		('', '097', 'LOCALLY ASSIGNED NLM-TYPE CLASSIFICATION NUMBER (OCLC)', 'LOCALLY ASSIGNED NLM-TYPE CLASSIFICATION NUMBER (OCLC)', 1, 0, NULL),
		('', '098', 'OTHER CLASSIFICATION SCHEMES (OCLC)', 'OTHER CLASSIFICATION SCHEMES (OCLC)', 1, 0, NULL),
		('', '099', 'LOCAL FREE-TEXT CALL NUMBER (OCLC)', 'LOCAL FREE-TEXT CALL NUMBER (OCLC)', 1, 0, NULL),
		('', '100', 'HEADING--PERSONAL NAME', 'HEADING--PERSONAL NAME', 0, 0, NULL),
		('', '110', 'HEADING--CORPORATE NAME', 'HEADING--CORPORATE NAME', 0, 0, NULL),
		('', '111', 'HEADING--MEETING NAME', 'HEADING--MEETING NAME', 0, 0, NULL),
		('', '130', 'HEADING--UNIFORM TITLE', 'HEADING--UNIFORM TITLE', 0, 0, NULL),
		('', '140', 'UNIFORM TITLE [OBSOLETE, CAN/MARC]', 'UNIFORM TITLE [OBSOLETE, CAN/MARC]', 1, 0, NULL),
		('', '143', 'COLLECTIVE TITLE [OBSOLETE, CAN/MARC]', 'COLLECTIVE TITLE [OBSOLETE, CAN/MARC]', 1, 0, NULL),
		('', '148', 'HEADING--CHRONOLOGICAL TERM', 'HEADING--CHRONOLOGICAL TERM', 0, 0, NULL),
		('', '150', 'HEADING--TOPICAL TERM', 'HEADING--TOPICAL TERM', 0, 0, NULL),
		('', '151', 'HEADING--GEOGRAPHIC NAME', 'HEADING--GEOGRAPHIC NAME', 0, 0, NULL),
		('', '153', 'CLASSIFICATION NUMBER [CLASSIFICATION FORMAT]', 'CLASSIFICATION NUMBER [CLASSIFICATION FORMAT]', 0, 0, NULL),
		('', '154', 'GENERAL EXPLANATORY INDEX TERM [CLASSIFICATION FORMAT]', 'GENERAL EXPLANATORY INDEX TERM [CLASSIFICATION FORMAT]', 0, 0, NULL),
		('', '155', 'HEADING--GENRE/FORM TERM', 'HEADING--GENRE/FORM TERM', 0, 0, NULL),
        ('', '162', 'HEADING-MEDIUM OF PERFORMANCE TERM', 'HEADING-MEDIUM OF PERFORMANCE TERM', 0, 0, NULL),
		('', '180', 'HEADING--GENERAL SUBDIVISION', 'HEADING--GENERAL SUBDIVISION', 0, 0, NULL),
		('', '181', 'HEADING--GEOGRAPHIC SUBDIVISION', 'HEADING--GEOGRAPHIC SUBDIVISION', 0, 0, NULL),
		('', '182', 'HEADING--CHRONOLOGICAL SUBDIVISION', 'HEADING--CHRONOLOGICAL SUBDIVISION', 0, 0, NULL),
		('', '185', 'HEADING--FORM SUBDIVISION', 'HEADING--FORM SUBDIVISION', 0, 0, NULL),
		('', '253', 'COMPLEX SEE REFERENCE [CLASSIFICATION FORMAT]', 'COMPLEX SEE REFERENCE [CLASSIFICATION FORMAT]', 1, 0, NULL),
		('', '260', 'COMPLEX SEE REFERENCE--SUBJECT', 'COMPLEX SEE REFERENCE--SUBJECT', 1, 0, NULL),
		('', '336', 'CONTENT TYPE', 'CONTENT TYPE', 1, 0, NULL),
		('', '353', 'COMPLEX SEE ALSO REFERENCE [CLASSIFICATION FORMAT]', 'COMPLEX SEE ALSO REFERENCE [CLASSIFICATION FORMAT]', 1, 0, NULL),
		('', '360', 'COMPLEX SEE ALSO REFERENCE--SUBJECT', 'COMPLEX SEE ALSO REFERENCE--SUBJECT', 1, 0, NULL),
		('', '368', 'OTHER ATTRIBUTES OF PERSON OR CORPORATE BODY', 'OTHER ATTRIBUTES OF PERSON OR CORPORATE BODY', 1, 0, NULL),
		('', '370', 'ASSOCIATED PLACE', 'ASSOCIATED PLACE', 1, 0, NULL),
		('', '371', 'ADDRESS', 'ADDRESS', 1, 0, NULL),
		('', '372', 'FIELD OF ACTIVITY', 'FIELD OF ACTIVITY', 1, 0, NULL),
		('', '373', 'ASSOCIATED GROUP', 'ASSOCIATED GROUP', 1, 0, NULL),
		('', '374', 'OCCUPATION', 'OCCUPATION', 1, 0, NULL),
		('', '375', 'GENDER', 'GENDER', 1, 0, NULL),
		('', '376', 'FAMILY INFORMATION', 'FAMILY INFORMATION', 1, 0, NULL),
		('', '377', 'ASSOCIATED LANGUAGE', 'ASSOCIATED LANGUAGE', 1, 0, NULL),
		('', '378', 'FULLER FORM OF PERSONAL NAME', 'FULLER FORM OF PERSONAL NAME', 0, 0, NULL),
		('', '380', 'FORM OF WORK', 'FORM OF WORK', 1, 0, NULL),
		('', '381', 'OTHER DISTINGUISHING CHARACTERISTICS OF WORK OR EXPRESSION', 'OTHER DISTINGUISHING CHARACTERISTICS OF WORK OR EXPRESSION', 1, 0, NULL),
		('', '382', 'MEDIUM OF PERFORMANCE', 'MEDIUM OF PERFORMANCE', 1, 0, NULL),
		('', '383', 'NUMERIC DESIGNATION OF MUSICAL WORK', 'NUMERIC DESIGNATION OF MUSICAL WORK', 1, 0, NULL),
		('', '384', 'KEY', 'KEY', 0, 0, NULL),
        ('', '385', 'AUDIENCE CHARACTERISTICS', 'AUDIENCE CHARACTERISTICS', 1, 0, NULL),
        ('', '386', 'CREATOR/CONTRIBUTOR CHARACTERISTICS', 'CREATOR/CONTRIBUTOR CHARACTERISTICS', 1, 0, NULL),
		('', '400', 'SEE FROM TRACING--PERSONAL NAME', 'SEE FROM TRACING--PERSONAL NAME', 1, 0, NULL),
		('', '410', 'SEE FROM TRACING--CORPORATE NAME', 'SEE FROM TRACING--CORPORATE NAME', 1, 0, NULL),
		('', '411', 'SEE FROM TRACING--MEETING NAME', 'SEE FROM TRACING--MEETING NAME', 1, 0, NULL),
		('', '430', 'SEE FROM TRACING--UNIFORM TITLE', 'SEE FROM TRACING--UNIFORM TITLE', 1, 0, NULL),
		('', '448', 'SEE FROM TRACING--CHRONOLOGICAL TERM', 'SEE FROM TRACING--CHRONOLOGICAL TERM', 1, 0, NULL),
		('', '450', 'SEE FROM TRACING--TOPICAL TERM', 'SEE FROM TRACING--TOPICAL TERM', 1, 0, NULL),
		('', '451', 'SEE FROM TRACING--GEOGRAPHIC NAME', 'SEE FROM TRACING--GEOGRAPHIC NAME', 1, 0, NULL),
		('', '453', 'INVALID NUMBER TRACING [CLASSIFICATION FORMAT]', 'INVALID NUMBER TRACING [CLASSIFICATION FORMAT]', 1, 0, NULL),
		('', '455', 'SEE FROM TRACING--GENRE/FORM TERM', 'SEE FROM TRACING--GENRE/FORM TERM', 1, 0, NULL),
        ('', '462', 'SEE FROM TRACING-MEDIUM OF PERFORMANCE TERM', 'SEE FROM TRACING-MEDIUM OF PERFORMANCE TERM', 1, 0, NULL),
		('', '480', 'SEE FROM TRACING--GENERAL SUBDIVISION', 'SEE FROM TRACING--GENERAL SUBDIVISION', 1, 0, NULL),
		('', '481', 'SEE FROM TRACING--GEOGRAPHIC SUBDIVISION', 'SEE FROM TRACING--GEOGRAPHIC SUBDIVISION', 1, 0, NULL),
		('', '482', 'SEE FROM TRACING--CHRONOLOGICAL SUBDIVISION', 'SEE FROM TRACING--CHRONOLOGICAL SUBDIVISION', 1, 0, NULL),
		('', '485', 'SEE FROM TRACING--FORM SUBDIVISION', 'SEE FROM TRACING--FORM SUBDIVISION', 1, 0, NULL),
		('', '500', 'SEE ALSO FROM TRACING--PERSONAL NAME', 'SEE ALSO FROM TRACING--PERSONAL NAME', 1, 0, NULL),
		('', '510', 'SEE ALSO FROM TRACING--CORPORATE NAME', 'SEE ALSO FROM TRACING--CORPORATE NAME', 1, 0, NULL),
		('', '511', 'SEE ALSO FROM TRACING--MEETING NAME', 'SEE ALSO FROM TRACING--MEETING NAME', 1, 0, NULL),
		('', '530', 'SEE ALSO FROM TRACING--UNIFORM TITLE', 'SEE ALSO FROM TRACING--UNIFORM TITLE', 1, 0, NULL),
		('', '548', 'SEE ALSO FROM TRACING--CHRONOLOGICAL TERM', 'SEE ALSO FROM TRACING--CHRONOLOGICAL TERM', 1, 0, NULL),
		('', '550', 'SEE ALSO FROM TRACING--TOPICAL TERM', 'SEE ALSO FROM TRACING--TOPICAL TERM', 1, 0, NULL),
		('', '551', 'SEE ALSO FROM TRACING--GEOGRAPHIC NAME', 'SEE ALSO FROM TRACING--GEOGRAPHIC NAME', 1, 0, NULL),
		('', '553', 'VALID NUMBER TRACING [CLASSIFICATION FORMAT]', 'VALID NUMBER TRACING [CLASSIFICATION FORMAT]', 1, 0, NULL),
		('', '555', 'SEE ALSO FROM TRACING--GENRE/FORM TERM', 'SEE ALSO FROM TRACING--GENRE/FORM TERM', 1, 0, NULL),
        ('', '562', 'SEE ALSO FROM TRACING-MEDIUM OF PERFORMANCE TERM', 'SEE ALSO FROM TRACING-MEDIUM OF PERFORMANCE TERM', 1, 0, NULL),
		('', '580', 'SEE ALSO FROM TRACING--GENERAL SUBDIVISION', 'SEE ALSO FROM TRACING--GENERAL SUBDIVISION', 1, 0, NULL),
		('', '581', 'SEE ALSO FROM TRACING--GEOGRAPHIC SUBDIVISION', 'SEE ALSO FROM TRACING--GEOGRAPHIC SUBDIVISION', 1, 0, NULL),
		('', '582', 'SEE ALSO FROM TRACING--CHRONOLOGICAL SUBDIVISION', 'SEE ALSO FROM TRACING--CHRONOLOGICAL SUBDIVISION', 1, 0, NULL),
		('', '585', 'SEE ALSO FROM TRACING--FORM SUBDIVISION', 'SEE ALSO FROM TRACING--FORM SUBDIVISION', 1, 0, NULL),
		('', '640', 'SERIES DATES OF PUBLICATION AND/OR SEQUENTIAL DESIGNATION', 'SERIES DATES OF PUBLICATION AND/OR SEQUENTIAL DESIGNATION', 1, 0, NULL),
		('', '641', 'SERIES NUMBERING PECULIARITIES', 'SERIES NUMBERING PECULIARITIES', 1, 0, NULL),
		('', '642', 'SERIES NUMBERING EXAMPLE', 'SERIES NUMBERING EXAMPLE', 1, 0, NULL),
		('', '643', 'SERIES PLACE AND PUBLISHER/ISSUING BODY', 'SERIES PLACE AND PUBLISHER/ISSUING BODY', 1, 0, NULL),
		('', '644', 'SERIES ANALYSIS PRACTICE', 'SERIES ANALYSIS PRACTICE', 1, 0, NULL),
		('', '645', 'SERIES TRACING PRACTICE', 'SERIES TRACING PRACTICE', 1, 0, NULL),
		('', '646', 'SERIES CLASSIFICATION PRACTICE', 'SERIES CLASSIFICATION PRACTICE', 1, 0, NULL),
		('', '663', 'COMPLEX SEE ALSO REFERENCE--NAME', 'COMPLEX SEE ALSO REFERENCE--NAME', 0, 0, NULL),
		('', '664', 'COMPLEX SEE REFERENCE--NAME', 'COMPLEX SEE REFERENCE--NAME', 0, 0, NULL),
		('', '665', 'HISTORY REFERENCE', 'HISTORY REFERENCE', 0, 0, NULL),
		('', '666', 'GENERAL EXPLANATORY REFERENCE--NAME', 'GENERAL EXPLANATORY REFERENCE--NAME', 0, 0, NULL),
		('', '667', 'NONPUBLIC GENERAL NOTE', 'NONPUBLIC GENERAL NOTE', 1, 0, NULL),
		('', '668', 'CHARACTERS IN NONROMAN ALPHABETS [OBSOLETE]', 'CHARACTERS IN NONROMAN ALPHABETS [OBSOLETE]', 1, 0, NULL),
		('', '670', 'SOURCE DATA FOUND', 'SOURCE DATA FOUND', 1, 0, NULL),
		('', '671', 'NOTE--WORK CATALOGUED [OBSOLETE, CAN/MARC ONLY]', 'NOTE--WORK CATALOGUED [OBSOLETE, CAN/MARC ONLY]', 1, 0, NULL),
        ('', '672', 'TITLE RELATED TO THE ENTITY', 'TITLE RELATED TO THE ENTITY', 1, 0, NULL),
        ('', '673', 'TITLE NOT RELATED TO THE ENTITY', 'TITLE NOT RELATED TO THE ENTITY', 1, 0, NULL),
		('', '675', 'SOURCE DATA NOT FOUND', 'SOURCE DATA NOT FOUND', 0, 0, NULL),
		('', '676', 'NOTE--CATALOGUING RULES (NAMES/TITLES) [OBSOLETE, CAN/MARC ONLY]', 'NOTE--CATALOGUING RULES (NAMES/TITLES) [OBSOLETE, CAN/MARC ONLY]', 0, 0, NULL),
		('', '678', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL),
		('', '680', 'PUBLIC GENERAL NOTE', 'PUBLIC GENERAL NOTE', 1, 0, NULL),
		('', '681', 'SUBJECT EXAMPLE TRACING NOTE', 'SUBJECT EXAMPLE TRACING NOTE', 1, 0, NULL),
		('', '682', 'DELETED HEADING INFORMATION', 'DELETED HEADING INFORMATION', 0, 0, NULL),
		('', '683', 'APPLICATION HISTORY NOTE', 'APPLICATION HISTORY NOTE', 1, 0, NULL),
		('', '684', 'AUXILIARY INSTRUCTION NOTE [CLASSIFICATION FORMAT]', 'AUXILIARY INSTRUCTION NOTE [CLASSIFICATION FORMAT]', 1, 0, NULL),
		('', '685', 'NOTE--SOURCE DATA FOUND (SUBJECTS) [OBSOLETE, CAN/MARC ONLY]', 'NOTE--SOURCE DATA FOUND (SUBJECTS) [OBSOLETE, CAN/MARC ONLY]', 1, 0, NULL),
		('', '686', 'NOTE--SOURCE DATA NOT FOUND (SUBJECTS) [OBSOLETE, CAN/MARC ONLY]', 'NOTE--SOURCE DATA NOT FOUND (SUBJECTS) [OBSOLETE, CAN/MARC ONLY]', 1, 0, NULL),
		('', '687', 'NOTE--USAGE (SUBJECTS) [OBSOLETE, CAN/MARC ONLY]', 'NOTE--USAGE (SUBJECTS) [OBSOLETE, CAN/MARC ONLY]', 1, 0, NULL),
		('', '688', 'APPLICATION HISTORY NOTE', 'APPLICATION HISTORY NOTE', 1, 0, NULL),
		('', '700', 'ESTABLISHED HEADING LINKING ENTRY--PERSONAL NAME', 'ESTABLISHED HEADING LINKING ENTRY--PERSONAL NAME', 1, 0, NULL),
		('', '710', 'ESTABLISHED HEADING LINKING ENTRY--CORPORATE NAME', 'ESTABLISHED HEADING LINKING ENTRY--CORPORATE NAME', 1, 0, NULL),
		('', '711', 'ESTABLISHED HEADING LINKING ENTRY--MEETING NAME', 'ESTABLISHED HEADING LINKING ENTRY--MEETING NAME', 1, 0, NULL),
		('', '730', 'ESTABLISHED HEADING LINKING ENTRY--UNIFORM TITLE', 'ESTABLISHED HEADING LINKING ENTRY--UNIFORM TITLE', 1, 0, NULL),
		('', '748', 'ESTABLISHED HEADING LINKING ENTRY--CHRONOLOGICAL TERM', 'ESTABLISHED HEADING LINKING ENTRY--CHRONOLOGICAL TERM', 1, 0, NULL),
		('', '750', 'ESTABLISHED HEADING LINKING ENTRY--TOPICAL TERM', 'ESTABLISHED HEADING LINKING ENTRY--TOPICAL TERM', 1, 0, NULL),
		('', '751', 'ESTABLISHED HEADING LINKING ENTRY--GEOGRAPHIC NAME', 'ESTABLISHED HEADING LINKING ENTRY--GEOGRAPHIC NAME', 1, 0, NULL),
		('', '753', 'INDEX TERM--UNCONTROLLED [CLASSIFICATION FORMAT]', 'INDEX TERM--UNCONTROLLED [CLASSIFICATION FORMAT]', 1, 0, NULL),
		('', '754', 'INDEX TERM--FACETED TOPICAL TERMS [CLASSIFICATION FORMAT]', 'INDEX TERM--FACETED TOPICAL TERMS [CLASSIFICATION FORMAT]', 1, 0, NULL),
		('', '755', 'ESTABLISHED HEADING LINKING ENTRY--GENRE/FORM TERM', 'ESTABLISHED HEADING LINKING ENTRY--GENRE/FORM TERM', 1, 0, NULL),
		('', '761', 'ADD OR DIVIDE LIKE INSTRUCTIONS [CLASSIFICATION FORMAT]', 'ADD OR DIVIDE LIKE INSTRUCTIONS [CLASSIFICATION FORMAT]', 1, 0, NULL),
        ('', '762', 'ESTABLISHED HEADING LINKING ENTRY-MEDIUM OF PERFORMANCE TERM', 'ESTABLISHED HEADING LINKING ENTRY-MEDIUM OF PERFORMANCE TERM', 1, 0, NULL),
		('', '763', 'INTERNAL SUBARRANGEMENT OR ADD TABLE ENTRY [CLASSIFICATION FORMAT]', 'INTERNAL SUBARRANGEMENT OR ADD TABLE ENTRY [CLASSIFICATION FORMAT]', 1, 0, NULL),
		('', '764', 'RULE IDENTIFICATION [CLASSIFICATION FORMAT]', 'RULE IDENTIFICATION [CLASSIFICATION FORMAT]', 1, 0, NULL),
		('', '765', 'SYNTHESIZED NUMBER COMPONENTS [CLASSIFICATION FORMAT]', 'SYNTHESIZED NUMBER COMPONENTS [CLASSIFICATION FORMAT]', 1, 0, NULL),
		('', '766', 'SECONDARY TABLE INFORMATION [CLASSIFICATION FORMAT]', 'SECONDARY TABLE INFORMATION [CLASSIFICATION FORMAT]', 1, 0, NULL),
		('', '768', 'CITATION AND PREFERENCE ORDER INSTRUCTIONS [CLASSIFICATION FORMAT]', 'CITATION AND PREFERENCE ORDER INSTRUCTIONS [CLASSIFICATION FORMAT]', 1, 0, NULL),
		('', '780', 'SUBDIVISION LINKING ENTRY--GENERAL SUBDIVISION', 'SUBDIVISION LINKING ENTRY--GENERAL SUBDIVISION', 1, 0, NULL),
		('', '781', 'SUBDIVISION LINKING ENTRY--GEOGRAPHIC SUBDIVISION', 'SUBDIVISION LINKING ENTRY--GEOGRAPHIC SUBDIVISION', 1, 0, NULL),
		('', '782', 'SUBDIVISION LINKING ENTRY--CHRONOLOGICAL SUBDIVISION', 'SUBDIVISION LINKING ENTRY--CHRONOLOGICAL SUBDIVISION', 1, 0, NULL),
		('', '785', 'SUBDIVISION LINKING ENTRY--FORM SUBDIVISION', 'SUBDIVISION LINKING ENTRY--FORM SUBDIVISION', 1, 0, NULL),
		('', '788', 'COMPLEX LINKING ENTRY DATA', 'COMPLEX LINKING ENTRY DATA', 0, 0, NULL),
		('', '856', 'ELECTRONIC LOCATION AND ACCESS', 'ELECTRONIC LOCATION AND ACCESS', 1, 0, NULL),
		('', '880', 'ALTERNATE GRAPHIC REPRESENTATION', 'ALTERNATE GRAPHIC REPRESENTATION', 1, 0, NULL),
		('', '883', 'MACHINE-GENERATED METADATA PROVENANCE', 'MACHINE-GENERATED METADATA PROVENANCE', 1, 0, NULL),
		('', '942', 'KOHA INTERNAL USE', 'KOHA INTERNAL USE', 0, 1, NULL);






-- ******************************************************

-- *******************************************************************
-- PERSONAL NAME AUTHORITY FIELDS/SUBFIELDS. XX0
-- *******************************************************************

-- copy from default auth framework except obsoleted tags

INSERT INTO auth_tag_structure (authtypecode, tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value)
    SELECT 'PERSO_NAME', tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value
    FROM auth_tag_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ('110','111','130','148','150','151','155','162',
                     '180','181','182','185','034','640','641','642',
                     '643','644','645','646');

INSERT INTO auth_subfield_structure (authtypecode, tagfield, tagsubfield, liblibrarian, libopac, repeatable,
mandatory, tab, authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode)
    SELECT 'PERSO_NAME', tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, tab,
    authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode
    FROM auth_subfield_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ('110','111','130','148','150','151','155','162',
                     '180','181','182','185','034','640','641','642',
                     '643','644','645','646');

-- ******************************************************

-- *******************************************************************
-- CORPORATE NAME AUTHORITY FIELDS/SUBFIELDS. X10
-- *******************************************************************

-- copy from default auth framework except obsoleted tags

INSERT INTO auth_tag_structure (authtypecode, tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value)
    SELECT 'CORPO_NAME', tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value
    FROM auth_tag_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ( '100','111','130','148','150','151','155','162',
                      '180','181','182','185','034','640','641','642',
                      '643','644','645','646');

INSERT INTO auth_subfield_structure (authtypecode, tagfield, tagsubfield, liblibrarian, libopac, repeatable,
mandatory, tab, authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode)
    SELECT 'CORPO_NAME', tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, tab,
    authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode
    FROM auth_subfield_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ( '100','111','130','148','150','151','155','162',
                      '180','181','182','185','034','640','641','642',
                      '643','644','645','646');

-- ******************************************************

-- *******************************************************************
-- MEETING NAME AUTHORITY FIELDS/SUBFIELDS. X11
-- *******************************************************************

-- copy from default auth framework except obsoleted tags

INSERT INTO auth_tag_structure (authtypecode, tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value)
    SELECT 'MEETI_NAME', tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value
    FROM auth_tag_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ( '100','110','130','148','150','151','155','162',
                      '180','181','182','185','640','641','642','643',
                      '644','645','646');

INSERT INTO auth_subfield_structure (authtypecode, tagfield, tagsubfield, liblibrarian, libopac, repeatable,
mandatory, tab, authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode)
    SELECT 'MEETI_NAME', tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, tab,
    authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode
    FROM auth_subfield_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ( '100','110','130','148','150','151','155','162',
                      '180','181','182','185','640','641','642','643',
                      '644','645','646');

-- ******************************************************

-- *******************************************************************
-- UNIFORM TITLE AUTHORITY FIELDS/SUBFIELDS. X30
-- *******************************************************************

-- copy from default auth framework except obsoleted tags

INSERT INTO auth_tag_structure (authtypecode, tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value)
    SELECT 'UNIF_TITLE', tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value
    FROM auth_tag_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ( '100','110','111','148','150','151','155','162',
                      '180','181','182','185');

INSERT INTO auth_subfield_structure (authtypecode, tagfield, tagsubfield, liblibrarian, libopac, repeatable,
mandatory, tab, authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode)
    SELECT 'UNIF_TITLE', tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, tab,
    authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode
    FROM auth_subfield_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ( '100','110','111','148','150','151','155','162',
                      '180','181','182','185');

-- ******************************************************

-- *******************************************************************
-- CHRONOLOGICAL TERMS AUTHORITY FIELDS/SUBFIELDS. X48
-- *******************************************************************

-- copy from default auth framework except obsoleted tags

INSERT INTO auth_tag_structure (authtypecode, tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value)
    SELECT 'CHRON_TERM', tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value
    FROM auth_tag_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ( '100','110','111','130','150','151','155','162',
                      '180','181','185','014','020','022','031','640',
                      '641','642','643','644','645','646');

INSERT INTO auth_subfield_structure (authtypecode, tagfield, tagsubfield, liblibrarian, libopac, repeatable,
mandatory, tab, authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode)
    SELECT 'CHRON_TERM', tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, tab,
    authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode
    FROM auth_subfield_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ( '100','110','111','130','150','151','155','162',
                      '180','181','185','014','020','022','031','640',
                      '641','642','643','644','645','646');

-- ******************************************************

-- *******************************************************************
-- TOPICAL TERMS AUTHORITY FIELDS/SUBFIELDS. X50
-- *******************************************************************

-- copy from default auth framework except obsoleted tags

INSERT INTO auth_tag_structure (authtypecode, tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value)
    SELECT 'TOPIC_TERM', tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value
    FROM auth_tag_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ( '100','110','111','130','148','151','155','162',
                      '181','182','185','014','020','022','031','640',
                      '641','642','643','644','645','646');

INSERT INTO auth_subfield_structure (authtypecode, tagfield, tagsubfield, liblibrarian, libopac, repeatable,
mandatory, tab, authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode)
    SELECT 'TOPIC_TERM', tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, tab,
    authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode
    FROM auth_subfield_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ( '100','110','111','130','148','151','155','162',
                      '181','182','185','014','020','022','031','640',
                      '641','642','643','644','645','646');

-- ******************************************************

-- *******************************************************************
-- GEOGRAPHIC NAMES AUTHORITY FIELDS/SUBFIELDS. X51
-- *******************************************************************

-- copy from default auth framework except obsoleted tags

INSERT INTO auth_tag_structure (authtypecode, tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value)
    SELECT 'GEOGR_NAME', tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value
    FROM auth_tag_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ( '100','110','111','130','148','150','155','162',
                      '180','182','185','014','020','022','031','640',
                      '641','642','643','644','645','646');

INSERT INTO auth_subfield_structure (authtypecode, tagfield, tagsubfield, liblibrarian, libopac, repeatable,
mandatory, tab, authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode)
    SELECT 'GEOGR_NAME', tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, tab,
    authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode
    FROM auth_subfield_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ( '100','110','111','130','148','150','155','162',
                      '180','182','185','014','020','022','031','640',
                      '641','642','643','644','645','646');

-- ******************************************************

-- *******************************************************************
-- GENRE/FORM TERMS AUTHORITY FIELDS/SUBFIELDS. X55
-- *******************************************************************

-- copy from default auth framework except obsoleted tags

INSERT INTO auth_tag_structure (authtypecode, tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value)
    SELECT 'GENRE/FORM', tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value
    FROM auth_tag_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ( '100','110','111','130','148','150','151','162',
                      '180','181','182','014','020','022','031','640',
                      '641','642','643','644','645','646');

INSERT INTO auth_subfield_structure (authtypecode, tagfield, tagsubfield, liblibrarian, libopac, repeatable,
mandatory, tab, authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode)
    SELECT 'GENRE/FORM', tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, tab,
    authorised_value, value_builder, seealso, isurl, hidden, linkid, kohafield, frameworkcode
    FROM auth_subfield_structure
    WHERE authtypecode = '' AND
    tagfield NOT IN ( '058','063','068','084','088','140','143','153',
                      '154','253','353','453','553','668','671','676',
                      '684','685','686','687','753','754',
                      '761','763','764','765','766','768') AND
    tagfield NOT IN ( '100','110','111','130','148','150','151','162',
                      '180','181','182','014','020','022','031','640',
                      '641','642','643','644','645','646');

-- ******************************************************
