JBAS-1390 Connexion authority SQL insert check
authorBill Erickson <berickxx@gmail.com>
Mon, 27 Jun 2016 19:50:42 +0000 (15:50 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Avoid inserts on initial build of sample databases.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/sql/schema/deploy/connexion-auth-imports.sql

index 37222e4..c8ee0b9 100644 (file)
@@ -3,10 +3,19 @@
 
 BEGIN;
 
-INSERT INTO vandelay.authority_queue (owner, name) VALUES (1, 'Connexion');
+DO $$
+BEGIN
+    IF evergreen.insert_on_deploy() THEN
+
+        INSERT INTO vandelay.authority_queue (owner, name) 
+            VALUES (1, 'Connexion');
+
+        INSERT INTO vandelay.merge_profile (owner, name, strip_spec)
+            VALUES (1, 'Connexion Authority Imports', '905');
+
+    END IF;
+END $$;
 
-INSERT INTO vandelay.merge_profile (owner, name, strip_spec)
-    VALUES (1, 'Connexion Authority Imports', '905');
 
 COMMIT;