I'm trying to see if this speeds up builds a bit. May not without a module boundary, but for now it's nice organization to have as the program grows.
17 lines
379 B
SQL
17 lines
379 B
SQL
-- +goose Up
|
|
CREATE TYPE NotificationType AS ENUM (
|
|
'oauth_token_invalidated');
|
|
|
|
CREATE TABLE notification (
|
|
id SERIAL PRIMARY KEY,
|
|
created TIMESTAMP WITHOUT TIME ZONE NOT NULL,
|
|
link TEXT NOT NULL,
|
|
message TEXT NOT NULL,
|
|
type NotificationType NOT NULL,
|
|
user_id INTEGER REFERENCES user_(id) NOT NULL);
|
|
|
|
|
|
|
|
-- +goose Down
|
|
DROP TABLE notification;
|
|
DROP TYPE NotificationType;
|