From f4b14d569c0685d7bde9f1dba9f5a59ce4ca04f1 Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Sat, 23 Feb 2013 16:47:56 -0800 Subject: [PATCH] CSPACE-5907: Remove legacy resources/db directory from ID service source code tree. --- services/id/build.xml | 4 - services/id/service/build.xml | 28 +- .../db/mysql/create_id_generators_table.sql | 43 -- .../resources/db/mysql/load_id_generators.sql | 640 ------------------ .../postgresql/create_id_generators_table.sql | 50 -- .../db/postgresql/load_id_generators.sql | 639 ----------------- 6 files changed, 1 insertion(+), 1403 deletions(-) delete mode 100644 services/id/service/src/main/resources/db/mysql/create_id_generators_table.sql delete mode 100644 services/id/service/src/main/resources/db/mysql/load_id_generators.sql delete mode 100644 services/id/service/src/main/resources/db/postgresql/create_id_generators_table.sql delete mode 100644 services/id/service/src/main/resources/db/postgresql/load_id_generators.sql diff --git a/services/id/build.xml b/services/id/build.xml index b8077a685..1837be17f 100644 --- a/services/id/build.xml +++ b/services/id/build.xml @@ -132,10 +132,6 @@ - - - - diff --git a/services/id/service/build.xml b/services/id/service/build.xml index 4b27ad5ac..756388868 100644 --- a/services/id/service/build.xml +++ b/services/id/service/build.xml @@ -109,33 +109,11 @@ - + - - - - - - - diff --git a/services/id/service/src/main/resources/db/mysql/create_id_generators_table.sql b/services/id/service/src/main/resources/db/mysql/create_id_generators_table.sql deleted file mode 100644 index 57b950e4a..000000000 --- a/services/id/service/src/main/resources/db/mysql/create_id_generators_table.sql +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This document is a part of the source code and related artifacts - * for CollectionSpace, an open source collections management system - * for museums and related institutions: - * - * http://www.collectionspace.org - * http://wiki.collectionspace.org - * - * Copyright © 2009 Regents of the University of California - * - * Licensed under the Educational Community License (ECL), Version 2.0. - * You may not use this file except in compliance with this License. - * - * You may obtain a copy of the ECL 2.0 License at - * https://source.collectionspace.org/collection-space/LICENSE.txt - */ - -/* - * create_id_generators_table.sql - * - * Creates the "id_generators" table, used by the ID Service, - * and sets the access permissions of that table. - * - * $LastChangedRevision$ - * $LastChangedDate$ - */ - -DROP TABLE IF EXISTS `id_generators`; -CREATE TABLE `id_generators` ( - `csid` varchar(80) PRIMARY KEY, - `displayname` varchar(80), - `description` varchar(500), - `priority` smallint(1) DEFAULT 9 NOT NULL, - `id_generator_state` varchar(8000) NOT NULL, - `last_generated_id` varchar(255), - `modified` timestamp NOT NULL - default CURRENT_TIMESTAMP - on update CURRENT_TIMESTAMP, - INDEX `csid_index` (`csid`) -) ENGINE=InnoDB; - - -SHOW WARNINGS; diff --git a/services/id/service/src/main/resources/db/mysql/load_id_generators.sql b/services/id/service/src/main/resources/db/mysql/load_id_generators.sql deleted file mode 100644 index 2cadf18f4..000000000 --- a/services/id/service/src/main/resources/db/mysql/load_id_generators.sql +++ /dev/null @@ -1,640 +0,0 @@ -/* - * This document is a part of the source code and related artifacts - * for CollectionSpace, an open source collections management system - * for museums and related institutions: - * - * http://www.collectionspace.org - * http://wiki.collectionspace.org - * - * Copyright © 2009 Regents of the University of California - * - * Licensed under the Educational Community License (ECL), Version 2.0. - * You may not use this file except in compliance with this License. - * - * You may obtain a copy of the ECL 2.0 License at - * https://source.collectionspace.org/collection-space/LICENSE.txt - */ - -/* - * load_id_generators_table.sql - * - * Loads a default set of data into the "id_generators" table, - * used by the ID Service. - * - * $LastChangedRevision$ - * $LastChangedDate$ - */ - -/* - * Note: in the priority column, values range from '1' (highest) - * to '9' (lowest). - */ - -/* - * NOTE: In the id_generator_state column, for numeric sequence parts - * whose first generated value should start at the initial value - * (such as '1'), enter '-1' for the - * - * Otherwise, the first generated value will be the next value - * in the sequence after the initial value (e.g. '2', if the - * initial value is '1'). - */ - --- ACCESSION_LOT_NUMBER - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('1a67470b-19b1-4ae3-88d4-2a0aa936270e', - 'Accession Activity Number', - 'Identifies accession activities, in which a lot of -one or more collection objects is acquired by the institution.', - '9', - '', -' - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- ACCESSION_NUMBER - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('9dd92952-c384-44dc-a736-95e435c1759c', - 'Accession Number', - 'Identifies individual collection objects formally -acquired by the institution. Used for collection objects -without parts.', - '9', - '', -' - - - - - - . - . - - - 6 - 1 - -1 - - - . - . - - - 6 - 1 - -1 - - -'); - --- ARCHIVES_NUMBER - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('70586d30-9dca-4a07-a3a2-1976fe898028', - 'Archives Number', - 'Identifies archives-related accession activities, -in which a lot of one or more collection objects is formally -acquired for the archives.', - '9', - '', -' - - - AR - AR - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- EVALUATION_NUMBER - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('d2d80822-25c7-4c7c-a105-fc40cdb0c50f', - 'Evaluation Number', - 'Identifies evaluation-related intake activities, -in which a lot of one or more collection objects is formally -acquired for evaluation.', - '9', - '', -' - - - EV - EV - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- INTAKE_NUMBER - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('8088cfa5-c743-4824-bb4d-fb11b12847f7', - 'Intake Number', - 'Identifies intake activities, in which a lot of one -or more collection objects enters the institution.', - '9', - '', -' - - - IN - IN - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- INTAKE_OBJECT_NUMBER - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('a91db555-5c53-4996-9918-6712351397a0', - 'Intake Object Number', - 'Identifies individual collection objects that enter -the institution through intake activities, before they are -either returned to their owner or formally acquired.', - '9', - '', -' - - - IN - IN - - - - - - . - . - - - 6 - 1 - -1 - - - . - . - - - 6 - 1 - -1 - - -'); - --- INVENTORY_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('6d472be6-2534-47f3-a3f1-3f160e7a9303', - 'Inventory Number', - 'Unambiguously identifies a location associated with an inventory event.', - '9', - '', -' - - - INV - INV - - - - - - . - . - - - 6 - 1 - -1 - - - . - . - - - 6 - 1 - -1 - - -'); - --- LIBRARY_NUMBER - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('80fedaf6-1647-4f30-9f53-a75a3cac2ffd', - 'Library Number', - 'Identifies library-related accession activities, -in which a lot of one or more collection objects is -formally acquired for the library.', - '9', - '', -' - - - LIB - LIB - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- LOANS_IN_NUMBER - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('ed87e7c6-0678-4f42-9d33-f671835586ef', - 'Loan In Number', - 'Identifies activities in which collection objects are -received on loan.', - '9', - '', -' - - - LI - LI - - - - - - . - . - - - 6 - 1 - -1 - - - . - . - - - 6 - 1 - -1 - - -'); - --- LOANS_OUT_NUMBER - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('4b984865-f93d-4481-b874-3dba863ec589', - 'Loan Out Number', - 'Identifies activities in which collection objects are -loaned out of the institution.', - '9', - '', -' - - - LO - LO - - - - - - . - . - - - 6 - 1 - -1 - - - . - . - - - 6 - 1 - -1 - - -'); - --- LOCATION_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('1fc5e383-0786-4126-9a3c-ec7df4517ee3', - 'Location Number', - 'Unambiguously identifies a general location, not associated with an -inventory or movement event.', - '9', - '', -' - - - LOC - LOC - - - - - - . - . - - - 6 - 1 - -1 - - - . - . - - - 6 - 1 - -1 - - -'); - --- MEDIA_RESOURCE_IDENTIFICATION_NUMBER - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('cd91d8b8-f346-4925-a425-93e02bd1c5c9', - 'Media Resource Identification Number', - 'Unambiguously identifies a media resource within a given context. -Recommended best practice is to identify the resource by means of a string -conforming to a formal identification system.', - '9', - '', -' - - - MR - MR - - - - - - . - . - - - 6 - 1 - -1 - - - . - . - - - 6 - 1 - -1 - - -'); - --- MOVEMENT_REFERENCE_NUMBER - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('49ca9d8d-7136-47ff-a70e-4a47b9038b70', - 'Movement Reference Number', - 'Identifies a movement of a collection object or a group of collection objects.', - '9', - '', -' - - - MV - MV - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- OBJECT_EXIT_NUMBER - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('d4eea707-d473-4367-853a-728fbcd9be17', - 'Object Exit Number', - 'Identifies an exit from the museum of collection objects, via -transfer or destruction, and the deaccessioning of those objects -from the museum\'s collections.', - '9', - '', -' - - - EX - EX - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- STUDY_NUMBER - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('0518132e-dd8c-4773-8fa9-07c9af4444ee', - 'Study Number', - 'Identifies study-related intake activities, -in which a lot of one or more collection objects is -formally acquired for study.', - '9', - '', -' - - - ST - ST - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- TRANSFER_OF_TITLE_NUMBER - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('c597a209-5954-4fa6-bf3f-f83c1a0ad586', - 'Transfer of Title Number', - 'Identifies the transfer of title for one or more collection objects -to a receiving institution.', - '9', - '', -' - - - TT - TT - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- UUID - -/* - * Note: these are Type 4 UUIDs, whose generation is based on - * random and pseudo-random parts. - */ - -INSERT INTO `id_generators` - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('1fa40353-05b8-4ae6-82a6-44a18b4f3c12', - 'UUID', - 'Universally unique identifiers (UUIDs), which may be -used for CollectionSpace IDs (CSIDs) and any other relevant -purposes.', - '9', - '', -' - - - - -'); - -SHOW WARNINGS; diff --git a/services/id/service/src/main/resources/db/postgresql/create_id_generators_table.sql b/services/id/service/src/main/resources/db/postgresql/create_id_generators_table.sql deleted file mode 100644 index 23f58c0a2..000000000 --- a/services/id/service/src/main/resources/db/postgresql/create_id_generators_table.sql +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This document is a part of the source code and related artifacts - * for CollectionSpace, an open source collections management system - * for museums and related institutions: - * - * http://www.collectionspace.org - * http://wiki.collectionspace.org - * - * Copyright © 2009 Regents of the University of California - * - * Licensed under the Educational Community License (ECL), Version 2.0. - * You may not use this file except in compliance with this License. - * - * You may obtain a copy of the ECL 2.0 License at - * https://source.collectionspace.org/collection-space/LICENSE.txt - */ - -/* - * create_id_generators_table.sql - * - * Creates the "id_generators" table, used by the ID Service, - * and sets the access permissions of that table. - * - * $LastChangedRevision$ - * $LastChangedDate$ - */ - -DROP TABLE IF EXISTS id_generators; -CREATE TABLE id_generators -( - csid character varying(80) NOT NULL, - displayname character varying(80), - description character varying(500), - priority integer NOT NULL DEFAULT 9, - id_generator_state character varying(8000) NOT NULL, - last_generated_id character varying(255), - modified timestamp without time zone NOT NULL DEFAULT now(), - CONSTRAINT id_generators_pkey PRIMARY KEY (csid) -) WITH ( - OIDS=FALSE -- See http://www.postgresql.org/docs/8.4/static/sql-createtable.html -); - --- CREATE UNIQUE INDEX csid_idx ON id_generators USING btree (csid); -CREATE OR REPLACE FUNCTION update_modified_column() -RETURNS TRIGGER AS 'BEGIN NEW.modified = now(); RETURN NEW; END;' language 'plpgsql'; - -CREATE TRIGGER update_customer_modtime BEFORE UPDATE - ON id_generators FOR EACH ROW EXECUTE PROCEDURE - update_modified_column(); - diff --git a/services/id/service/src/main/resources/db/postgresql/load_id_generators.sql b/services/id/service/src/main/resources/db/postgresql/load_id_generators.sql deleted file mode 100644 index 47b69b9bc..000000000 --- a/services/id/service/src/main/resources/db/postgresql/load_id_generators.sql +++ /dev/null @@ -1,639 +0,0 @@ -/* - * This document is a part of the source code and related artifacts - * for CollectionSpace, an open source collections management system - * for museums and related institutions: - * - * http://www.collectionspace.org - * http://wiki.collectionspace.org - * - * Copyright © 2009 Regents of the University of California - * - * Licensed under the Educational Community License (ECL), Version 2.0. - * You may not use this file except in compliance with this License. - * - * You may obtain a copy of the ECL 2.0 License at - * https://source.collectionspace.org/collection-space/LICENSE.txt - */ - -/* - * load_id_generators_table.sql - * - * Loads a default set of data into the "id_generators" table, - * used by the ID Service. - * - * $LastChangedRevision$ - * $LastChangedDate$ - */ - -/* - * Note: in the priority column, values range from '1' (highest) - * to '9' (lowest). - */ - -/* - * NOTE: In the id_generator_state column, for numeric sequence parts - * whose first generated value should start at the initial value - * (such as '1'), enter '-1' for the - * - * Otherwise, the first generated value will be the next value - * in the sequence after the initial value (e.g. '2', if the - * initial value is '1'). - */ - --- ACCESSION_LOT_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('1a67470b-19b1-4ae3-88d4-2a0aa936270e', - 'Accession Activity Number', - 'Identifies accession activities, in which a lot of -one or more collection objects is acquired by the institution.', - '9', - '', -' - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- ACCESSION_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('9dd92952-c384-44dc-a736-95e435c1759c', - 'Accession Number', - 'Identifies individual collection objects formally -acquired by the institution. Used for collection objects -without parts.', - '9', - '', -' - - - - - - . - . - - - 6 - 1 - -1 - - - . - . - - - 6 - 1 - -1 - - -'); - --- ARCHIVES_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('70586d30-9dca-4a07-a3a2-1976fe898028', - 'Archives Number', - 'Identifies archives-related accession activities, -in which a lot of one or more collection objects is formally -acquired for the archives.', - '9', - '', -' - - - AR - AR - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- EVALUATION_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('d2d80822-25c7-4c7c-a105-fc40cdb0c50f', - 'Evaluation Number', - 'Identifies evaluation-related intake activities, -in which a lot of one or more collection objects is formally -acquired for evaluation.', - '9', - '', -' - - - EV - EV - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- INTAKE_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('8088cfa5-c743-4824-bb4d-fb11b12847f7', - 'Intake Number', - 'Identifies intake activities, in which a lot of one -or more collection objects enters the institution.', - '9', - '', -' - - - IN - IN - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- INTAKE_OBJECT_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('a91db555-5c53-4996-9918-6712351397a0', - 'Intake Object Number', - 'Identifies individual collection objects that enter -the institution through intake activities, before they are -either returned to their owner or formally acquired.', - '9', - '', -' - - - IN - IN - - - - - - . - . - - - 6 - 1 - -1 - - - . - . - - - 6 - 1 - -1 - - -'); - --- INVENTORY_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('6d472be6-2534-47f3-a3f1-3f160e7a9303', - 'Inventory Number', - 'Unambiguously identifies a location associated with an inventory event.', - '9', - '', -' - - - INV - INV - - - - - - . - . - - - 6 - 1 - -1 - - - . - . - - - 6 - 1 - -1 - - -'); - --- LIBRARY_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('80fedaf6-1647-4f30-9f53-a75a3cac2ffd', - 'Library Number', - 'Identifies library-related accession activities, -in which a lot of one or more collection objects is -formally acquired for the library.', - '9', - '', -' - - - LIB - LIB - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- LOANS_IN_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('ed87e7c6-0678-4f42-9d33-f671835586ef', - 'Loan In Number', - 'Identifies activities in which collection objects are -received on loan.', - '9', - '', -' - - - LI - LI - - - - - - . - . - - - 6 - 1 - -1 - - - . - . - - - 6 - 1 - -1 - - -'); - --- LOANS_OUT_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('4b984865-f93d-4481-b874-3dba863ec589', - 'Loan Out Number', - 'Identifies activities in which collection objects are -loaned out of the institution.', - '9', - '', -' - - - LO - LO - - - - - - . - . - - - 6 - 1 - -1 - - - . - . - - - 6 - 1 - -1 - - -'); - --- LOCATION_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('1fc5e383-0786-4126-9a3c-ec7df4517ee3', - 'Location Number', - 'Unambiguously identifies a general location, not associated with an -inventory or movement event.', - '9', - '', -' - - - LOC - LOC - - - - - - . - . - - - 6 - 1 - -1 - - - . - . - - - 6 - 1 - -1 - - -'); - --- MEDIA_RESOURCE_IDENTIFICATION_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('cd91d8b8-f346-4925-a425-93e02bd1c5c9', - 'Media Resource Identification Number', - 'Unambiguously identifies a media resource within a given context. -Recommended best practice is to identify the resource by means of a string -conforming to a formal identification system.', - '9', - '', -' - - - MR - MR - - - - - - . - . - - - 6 - 1 - -1 - - - . - . - - - 6 - 1 - -1 - - -'); - --- MOVEMENT_REFERENCE_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('49ca9d8d-7136-47ff-a70e-4a47b9038b70', - 'Movement Reference Number', - 'Identifies a movement of a collection object or a group of collection objects.', - '9', - '', -' - - - MV - MV - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- OBJECT_EXIT_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('d4eea707-d473-4367-853a-728fbcd9be17', - 'Object Exit Number', - 'Identifies an exit from the museum of collection objects, via -transfer or destruction, and the deaccessioning of those objects -from the museum''s collections.', - '9', - '', -' - - - EX - EX - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- STUDY_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('0518132e-dd8c-4773-8fa9-07c9af4444ee', - 'Study Number', - 'Identifies study-related intake activities, -in which a lot of one or more collection objects is -formally acquired for study.', - '9', - '', -' - - - ST - ST - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- TRANSFER_OF_TITLE_NUMBER - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('c597a209-5954-4fa6-bf3f-f83c1a0ad586', - 'Transfer of Title Number', - 'Identifies the transfer of title for one or more collection objects -to a receiving institution.', - '9', - '', -' - - - TT - TT - - - - - - . - . - - - 6 - 1 - -1 - - -'); - --- UUID - -/* - * Note: these are Type 4 UUIDs, whose generation is based on - * random and pseudo-random parts. - */ - -INSERT INTO id_generators - (csid, displayname, description, priority, last_generated_id, id_generator_state) - VALUES - ('1fa40353-05b8-4ae6-82a6-44a18b4f3c12', - 'UUID', - 'Universally unique identifiers (UUIDs), which may be -used for CollectionSpace IDs (CSIDs) and any other relevant -purposes.', - '9', - '', -' - - - - -'); - -- 2.47.3