LP#1901932 Wish List - Enhanced Concerto dataset
authorblake <blake@mobiusconsortium.org>
Wed, 1 Mar 2023 21:19:30 +0000 (15:19 -0600)
committerGalen Charlton <gmc@equinoxOLI.org>
Wed, 3 May 2023 14:05:44 +0000 (10:05 -0400)
Tweaks to the build script, hardcoding some sequences that aren't set
automatically. Also removed the "admin" user (1) entry from actor.passwd

Signed-off-by: blake <blake@mobiusconsortium.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/support-scripts/make_concerto_from_evergreen_db.pl
Open-ILS/tests/datasets/sql/concerto_enhanced/actor.passwd.sql
Open-ILS/tests/datasets/sql/concerto_enhanced/load_all.sql

index 7fd9faa..e7d6159 100755 (executable)
@@ -290,6 +290,14 @@ sub start {
         }
     }
     $loadAll = loadTableOrderMaker( $loadAll, \@loadTables );
+
+    $loadAll .= "SELECT SETVAL('money.billable_xact_id_seq', (SELECT MAX(id) FROM money.billing));\n\n";
+    $loadAll .= "SELECT SETVAL('config.remote_account_id_seq', (SELECT MAX(id) FROM config.remote_account));\n\n";
+    $loadAll .= "SELECT SETVAL('money.payment_id_seq', (SELECT MAX(id) FROM money.payment));\n\n";
+    $loadAll .= "SELECT SETVAL('asset.copy_id_seq', (SELECT MAX(id) FROM asset.copy));\n\n";
+    $loadAll .= "SELECT SETVAL('vandelay.queue_id_seq', (SELECT MAX(id) FROM vandelay.queue));\n\n";
+    $loadAll .= "SELECT SETVAL('vandelay.queued_record_id_seq', (SELECT MAX(id) FROM vandelay.queued_record));\n\n";
+
     $loadAll .= "COMMIT;\n";
     print "Writing loader > $outputFolder/load_all.sql\n";
     open( OUT, "> $outputFolder/load_all.sql" );
index dde1985..fc58777 100644 (file)
@@ -1,5 +1,4 @@
 COPY actor.passwd (id, usr, salt, passwd, passwd_type, create_date, edit_date) FROM stdin;
-1      1       $2a$10$AQ4PRNs/1y.58rvBxSxXfO   $2a$10$AQ4PRNs/1y.58rvBxSxXfORu5kSruw4b147ca/5uAkBqZO6FbwpR6    main    2020-10-27 09:26:51.297778-05   2020-10-28 13:26:41.155389-05
 2      244     $2a$10$v7ivz4K4vm1mfpw1U5oXbu   $2a$10$v7ivz4K4vm1mfpw1U5oXbucM6t5KPImhg7aAG/uT1ZkRFbyGI/2F2    main    2021-10-26 15:09:03.944163-05   2021-10-26 15:09:03.944163-05
 3      245     $2a$10$zMF0yOe9Gu.RwbxImTMNqe   $2a$10$zMF0yOe9Gu.RwbxImTMNqexLWkqKm6f513X5TMGjjF4REa22dx9nO    main    2021-10-26 15:12:01.856347-05   2021-10-26 15:12:01.856347-05
 4      246     $2a$10$TOn2Y6nOsTG/Np0N1CYLpe   $2a$10$TOn2Y6nOsTG/Np0N1CYLpePfRB/RzGyCBtgyqYrSVjsgAjUibsRYS    main    2021-10-26 15:21:06.684406-05   2021-10-26 15:21:06.684406-05
index 15e1e6f..a33204f 100644 (file)
@@ -384,4 +384,11 @@ SET CONSTRAINTS ALL DEFERRED;
 \echo loading vandelay.session_tracker
 \i vandelay.session_tracker.sql
 
+SELECT SETVAL('money.billable_xact_id_seq', (SELECT MAX(id) FROM money.billing));
+SELECT SETVAL('config.remote_account_id_seq', (SELECT MAX(id) FROM config.remote_account));
+SELECT SETVAL('money.payment_id_seq', (SELECT MAX(id) FROM money.payment));
+SELECT SETVAL('asset.copy_id_seq', (SELECT MAX(id) FROM asset.copy));
+SELECT SETVAL('vandelay.queue_id_seq', (SELECT MAX(id) FROM vandelay.queue));
+SELECT SETVAL('vandelay.queued_record_id_seq', (SELECT MAX(id) FROM vandelay.queued_record));
+
 COMMIT;