diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-11-27 21:21:04 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-11-27 21:21:04 +0100 |
commit | cf2e37cd876651e799893e8fe5babb51a9e12dd7 (patch) | |
tree | 437047cc646fb1a3a86f4226fd5460bbe2b0c530 /src/exchangedb/0002-work_shards.sql | |
parent | f2ba02aab2b9bbd976107ecc4ac7e7d657a9d73a (diff) | |
download | exchange-cf2e37cd876651e799893e8fe5babb51a9e12dd7.tar.xz |
more work on SQL refactoring
Diffstat (limited to 'src/exchangedb/0002-work_shards.sql')
-rw-r--r-- | src/exchangedb/0002-work_shards.sql | 18 |
1 files changed, 2 insertions, 16 deletions
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 <http://www.gnu.org/licenses/> -- -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); |