crystal-gauntlet/db/migrations/8_account_comments.sql

13 lines
339 B
MySQL
Raw Normal View History

2022-12-31 19:29:51 +01:00
-- +migrate up
CREATE TABLE account_comments (
id SERIAL PRIMARY KEY,
2023-01-05 20:39:24 +01:00
account_id INTEGER NOT NULL references users(id),
comment VARCHAR(140) NOT NULL,
2022-12-31 19:29:51 +01:00
created_at TEXT NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'now')),
likes INTEGER NOT NULL DEFAULT 0
);
-- +migrate down
DROP TABLE account_comments;