~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH hire.sr.ht] schema.sql: fix table definitions

Details
Message ID
<20230123104926.2433-1-umar@handlerug.me>
DKIM signature
pass
Download raw message
Patch: +3 -3
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
Details
Message ID
<CPZIR08G9JSA.2TX66JU7HOLZD@taiga>
In-Reply-To
<20230123104926.2433-1-umar@handlerug.me> (view parent)
DKIM signature
pass
Download raw message
Thanks!

To git@git.sr.ht:~sircmpwn/hire.sr.ht
   733c3fe..ccfe6b6  master -> master
Reply to thread Export thread (mbox)