ferri/migrations/20250410182845_add_post.sql

13 lines
287 B
MySQL
Raw Permalink Normal View History

2025-04-10 19:40:50 +01:00
CREATE TABLE IF NOT EXISTS post
(
id TEXT PRIMARY KEY NOT NULL,
2025-04-28 21:06:17 +01:00
uri TEXT NOT NULL UNIQUE,
2025-04-10 19:40:50 +01:00
user_id TEXT NOT NULL,
content TEXT NOT NULL,
created_at TEXT NOT NULL,
2025-04-26 12:17:32 +01:00
boosted_post_id TEXT,
2025-04-10 19:40:50 +01:00
2025-04-26 12:17:32 +01:00
FOREIGN KEY(user_id) REFERENCES user(id),
FOREIGN KEY(boosted_post_id) REFERENCES post(id)
2025-04-10 19:40:50 +01:00
);