Change `serial` to `PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY` which
is the SQL-standard way of defining an auto-incrementing PK, and while
we're at it, fix my `DEFAULT` typo introduced in the commit
733c3fe019ff2accdaf7f2e3673d0e68d86adc39.
---
schema.sql | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/schema.sql b/schema.sql
index 3b7aacf..ebdb032 100644
--- a/schema.sql
+++ b/schema.sql
@@ -57,9 +57,9 @@ CREATE TYPE unit AS ENUM (
);
CREATE TABLE profile (
- id serial PRIMARY KEY,
- created timestamp NOT NULL DEFAULT now() at time zone 'utc',
- updated timestamp NOT NULL DEFAULT now() at time zone 'utc',
+ id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
+ created timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
+ updated timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
user_id integer NOT NULL UNIQUE REFERENCES "user"(id),
display_name text NOT NULL,
snippet text NOT NULL,
--
2.39.1