You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
479 B
14 lines
479 B
2 weeks ago
|
-- +goose Up
|
||
|
-- +goose StatementBegin
|
||
|
CREATE TABLE message (id INTEGER PRIMARY KEY, text TEXT NOT NULL, user_id INTEGER NOT NULL, created_at DATETIME DEFAULT current_timestamp, likes INTEGER DEFAULT 0, bookmarks INTEGER DEFAULT 0, replying_to INTEGER);
|
||
|
|
||
|
CREATE TABLE bookmark (user_id INTEGER NOT NULL, message_id INTEGER NOT NULL);
|
||
|
-- +goose StatementEnd
|
||
|
|
||
|
-- +goose Down
|
||
|
-- +goose StatementBegin
|
||
|
DROP TABLE message;
|
||
|
DROP TABLE reply;
|
||
|
DROP TABLE bookmark;
|
||
|
-- +goose StatementEnd
|