From cf2e37cd876651e799893e8fe5babb51a9e12dd7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 27 Nov 2022 21:21:04 +0100 Subject: more work on SQL refactoring --- src/exchangedb/0002-work_shards.sql | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'src/exchangedb/0002-work_shards.sql') diff --git a/src/exchangedb/0002-work_shards.sql b/src/exchangedb/0002-work_shards.sql index d33022054..fbe7e7086 100644 --- a/src/exchangedb/0002-work_shards.sql +++ b/src/exchangedb/0002-work_shards.sql @@ -14,7 +14,7 @@ -- TALER; see the file COPYING. If not, see -- -CREATE TABLE IF NOT EXISTS work_shards +CREATE TABLE work_shards (shard_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE ,last_attempt INT8 NOT NULL ,start_row INT8 NOT NULL @@ -38,23 +38,9 @@ COMMENT ON COLUMN work_shards.end_row COMMENT ON COLUMN work_shards.job_name IS 'unique name of the job the workers on this shard are performing'; -CREATE INDEX IF NOT EXISTS work_shards_by_job_name_completed_last_attempt_index +CREATE INDEX work_shards_by_job_name_completed_last_attempt_index ON work_shards (job_name ,completed ,last_attempt ASC ); - - -INSERT INTO exchange_tables - (name - ,version - ,action - ,partitioned - ,by_range) - VALUES - ('work_shards' - ,'exchange-0002' - ,'create' - ,FALSE - ,FALSE); -- cgit v1.2.3