summaryrefslogtreecommitdiff
path: root/src/stasis
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-17 23:09:12 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-17 23:09:12 +0100
commitaab703a7e3047c61cfd0f84290251c982c5ba97b (patch)
treed847ea091e824ea975aa17693e184a8884725686 /src/stasis
parent294f3472a046e6df497ac6606498d9bef983e5b3 (diff)
downloadanastasis-aab703a7e3047c61cfd0f84290251c982c5ba97b.tar.gz
anastasis-aab703a7e3047c61cfd0f84290251c982c5ba97b.tar.bz2
anastasis-aab703a7e3047c61cfd0f84290251c982c5ba97b.zip
-migrate to Postgress 11: use BIGINT GENERATED BY DEFAULT AS IDENTITY instead of BIGSERIAL
Diffstat (limited to 'src/stasis')
-rw-r--r--src/stasis/stasis-0001.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/stasis/stasis-0001.sql b/src/stasis/stasis-0001.sql
index d512473..38e60fc 100644
--- a/src/stasis/stasis-0001.sql
+++ b/src/stasis/stasis-0001.sql
@@ -73,7 +73,7 @@ COMMENT ON COLUMN anastasis_user.expiration_date
CREATE TABLE IF NOT EXISTS anastasis_recdoc_payment
- (payment_id BIGSERIAL PRIMARY KEY,
+ (payment_id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
user_id BYTEA NOT NULL REFERENCES anastasis_user(user_id),
post_counter INT4 NOT NULL DEFAULT 0 CHECK(post_counter >= 0),
amount_val INT8 NOT NULL,
@@ -102,7 +102,7 @@ COMMENT ON COLUMN anastasis_recdoc_payment.paid
CREATE TABLE IF NOT EXISTS anastasis_challenge_payment
- (payment_id BIGSERIAL PRIMARY KEY,
+ (payment_id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
truth_uuid BYTEA CHECK(LENGTH(truth_uuid)=32) NOT NULL,
amount_val INT8 NOT NULL,
amount_frac INT4 NOT NULL,
@@ -200,7 +200,7 @@ COMMENT ON INDEX anastasis_challengecode_expiration_index
CREATE TABLE IF NOT EXISTS anastasis_auth_iban_in
- (auth_in_serial_id BIGSERIAL UNIQUE
+ (auth_in_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE
,wire_reference INT8 NOT NULL PRIMARY KEY
,wire_subject TEXT NOT NULL
,credit_val INT8 NOT NULL