diff options
Diffstat (limited to 'src/exchangedb/0002-revolving_work_shards.sql')
-rw-r--r-- | src/exchangedb/0002-revolving_work_shards.sql | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/exchangedb/0002-revolving_work_shards.sql b/src/exchangedb/0002-revolving_work_shards.sql index 791966319..83094297e 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); |