From cf2e37cd876651e799893e8fe5babb51a9e12dd7 Mon Sep 17 00:00:00 2001
From: Christian Grothoff <christian@grothoff.org>
Date: Sun, 27 Nov 2022 21:21:04 +0100
Subject: more work on SQL refactoring

---
 src/exchangedb/0002-revolving_work_shards.sql | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

(limited to 'src/exchangedb/0002-revolving_work_shards.sql')

diff --git a/src/exchangedb/0002-revolving_work_shards.sql b/src/exchangedb/0002-revolving_work_shards.sql
index 79196631..83094297 100644
--- a/src/exchangedb/0002-revolving_work_shards.sql
+++ b/src/exchangedb/0002-revolving_work_shards.sql
@@ -14,7 +14,7 @@
 -- TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
 --
 
-CREATE UNLOGGED TABLE IF NOT EXISTS revolving_work_shards
+CREATE UNLOGGED TABLE revolving_work_shards
   (shard_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE
   ,last_attempt INT8 NOT NULL
   ,start_row INT4 NOT NULL
@@ -38,23 +38,9 @@ COMMENT ON COLUMN revolving_work_shards.end_row
 COMMENT ON COLUMN revolving_work_shards.job_name
   IS 'unique name of the job the workers on this shard are performing';
 
-CREATE INDEX IF NOT EXISTS revolving_work_shards_by_job_name_active_last_attempt_index
+CREATE INDEX revolving_work_shards_by_job_name_active_last_attempt_index
   ON revolving_work_shards
   (job_name
   ,active
   ,last_attempt
   );
-
-
-INSERT INTO exchange_tables
-    (name
-    ,version
-    ,action
-    ,partitioned
-    ,by_range)
-  VALUES
-    ('revolving_work_shards'
-    ,'exchange-0002'
-    ,'create'
-    ,FALSE
-    ,FALSE);
-- 
cgit v1.2.3

