diff options
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); |