]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-3586: Add config for autogenerating Media Resource Identification numbers.
authorAron Roberts <aron@socrates.berkeley.edu>
Mon, 28 Feb 2011 23:04:43 +0000 (23:04 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Mon, 28 Feb 2011 23:04:43 +0000 (23:04 +0000)
services/id/service/src/main/resources/db/mysql/load_id_generators.sql

index 31e517f213a1f20294349ee597ffce5f07fab583..1de199f1ec4f6f61df1b1b7e53d27e2bbce061d3 100644 (file)
@@ -363,6 +363,49 @@ loaned out of the institution.',
   </parts>
 </org.collectionspace.services.id.SettableIDGenerator>');
 
+-- 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',
+     '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+  <parts>
+    <org.collectionspace.services.id.StringIDGeneratorPart>
+      <initialValue>MR</initialValue>
+      <currentValue>MR</currentValue>
+    </org.collectionspace.services.id.StringIDGeneratorPart>
+    <org.collectionspace.services.id.YearIDGeneratorPart>
+      <currentValue></currentValue>
+    </org.collectionspace.services.id.YearIDGeneratorPart>
+    <org.collectionspace.services.id.StringIDGeneratorPart>
+      <initialValue>.</initialValue>
+      <currentValue>.</currentValue>
+    </org.collectionspace.services.id.StringIDGeneratorPart>
+    <org.collectionspace.services.id.NumericIDGeneratorPart>
+      <maxLength>6</maxLength>
+      <initialValue>1</initialValue>
+      <currentValue>-1</currentValue>
+    </org.collectionspace.services.id.NumericIDGeneratorPart>
+    <org.collectionspace.services.id.StringIDGeneratorPart>
+      <initialValue>.</initialValue>
+      <currentValue>.</currentValue>
+    </org.collectionspace.services.id.StringIDGeneratorPart>
+    <org.collectionspace.services.id.NumericIDGeneratorPart>
+      <maxLength>6</maxLength>
+      <initialValue>1</initialValue>
+      <currentValue>-1</currentValue>
+    </org.collectionspace.services.id.NumericIDGeneratorPart>
+  </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+
 -- MOVEMENT_REFERENCE_NUMBER
 
 INSERT INTO `id_generators`