From: Mischa POSLAWSKY Date: Sun, 23 Oct 2022 22:29:26 +0000 (+0200) Subject: word: declare postgresql sequences as identities X-Git-Tag: v1.14~43 X-Git-Url: http://git.shiar.net/sheet.git/commitdiff_plain/347b8aa582998cdf49341a4ac61a25cb4a41e8ea word: declare postgresql sequences as identities --- diff --git a/tools/word.pg.sql b/tools/word.pg.sql index 9f6bd41..7f97ada 100644 --- a/tools/word.pg.sql +++ b/tools/word.pg.sql @@ -4,7 +4,7 @@ CREATE TABLE login ( email text, fullname text, editlang text[], - id serial NOT NULL PRIMARY KEY + id integer NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY ); CREATE TABLE word ( @@ -24,7 +24,7 @@ CREATE TABLE word ( creator integer REFERENCES login (id), created timestamptz DEFAULT now(), updated timestamptz, - id serial NOT NULL PRIMARY KEY + id integer NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY ); COMMENT ON COLUMN word.form IS 'preferred textual representation'; @@ -49,7 +49,7 @@ CREATE TABLE kind ( creator integer REFERENCES login (id), created timestamptz DEFAULT now(), updated timestamptz, - id serial NOT NULL PRIMARY KEY + id integer NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY ); COMMENT ON COLUMN kind.truth IS 'link validity ranging from 0 (never) to 100 (always)';