Last active
April 13, 2021 07:25
-
-
Save pot-code/dc59fe348f59475beee0d1dd020ee8a8 to your computer and use it in GitHub Desktop.
[postgres] #pgsql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE notification ( | |
"id" VARCHAR(32), | |
"action_type" SMALLINT NOT NULL, | |
"obj_type" VARCHAR(16) NOT NULL, | |
"obj" VARCHAR(32) NOT NULL, | |
"actor" VARCHAR(32) NOT NULL, | |
"create_at" timestamp DEFAULT (now() at time zone 'utc'), | |
"updated_at" timestamp DEFAULT (now() at time zone 'utc'), | |
"status" SMALLINT NOT NULL DEFAULT 1, | |
PRIMARY KEY ("id"), | |
CONSTRAINT actor_fk FOREIGN KEY (actor) REFERENCES "user" (id) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment