]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
DRYD-906: Add Pot Tag Number IdGen
authorMark Cooper <mark.c.cooper@outlook.com>
Wed, 30 Sep 2020 20:56:18 +0000 (13:56 -0700)
committerMark Cooper <mark.c.cooper@outlook.com>
Wed, 30 Sep 2020 20:56:18 +0000 (13:56 -0700)
services/common/src/main/resources/db/postgresql/load_botgarden_id_generators.sql

index a92b65b3a1f89d798d88c41bb6b00adb8d012a60..122908f9fcdfe7c283c477fbd2d297ae8aba6e40 100644 (file)
@@ -72,8 +72,6 @@ WHERE 'ed3c8578-cf01-4a05-b7fc-8e49b96273c6' NOT IN
       FROM    id_generators
       );
 
-
-
 -- JEPS_ACCESSION_NUMBER
 
 INSERT INTO id_generators
@@ -105,8 +103,6 @@ WHERE 'd9eca382-23b7-47aa-8d9b-d7ff88f49e2b' NOT IN
       FROM    id_generators
       );
 
-
-
 -- VOUCHER_NUMBER
 
 INSERT INTO id_generators
@@ -143,7 +139,6 @@ WHERE '940710aa-3df4-4bd4-8d6f-9bf6a92b35cc' NOT IN
       FROM    id_generators
       );
 
-
 -- PROP_NUMBER
 
 INSERT INTO id_generators
@@ -168,4 +163,40 @@ WHERE '81cf5a56-d43d-49e9-ac11-61cf4b0923d4' NOT IN
       (
       SELECT  csid
       FROM    id_generators
-      );
\ No newline at end of file
+      );
+
+-- POTTAG
+
+INSERT INTO id_generators
+    (csid, displayname, description, priority, last_generated_id, id_generator_state)
+  SELECT
+     '3e2e4115-157e-4598-a34b-44224f23c721',
+     'Pot Tag Number',
+     'Reference number for a Pot Tag.',
+     '9',
+     '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+  <parts>
+    <org.collectionspace.services.id.StringIDGeneratorPart>
+      <initialValue>PT</initialValue>
+      <currentValue>PT</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>
+  </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+  WHERE '3e2e4115-157e-4598-a34b-44224f23c721' NOT IN
+        (
+        SELECT  csid
+        FROM    id_generators
+        );