Restore post schema

This commit is contained in:
Kiril Kovachev 2024-10-14 12:05:20 +01:00
parent 04c52d20c3
commit b63c2a5f10

View File

@ -7,12 +7,11 @@ CREATE TABLE user (
password TEXT NOT NULL
);
-- CREATE TABLE post (
-- id INTEGER PRIMARY KEY AUTOINCREMENT,
-- author_id INTEGER NOT NULL,
-- created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-- title TEXT NOT NULL,
-- body TEXT NOT NULL,
-- FOREIGN KEY (author_id) REFERENCES user (id)
-- );
CREATE TABLE post (
id INTEGER PRIMARY KEY AUTOINCREMENT,
author_id INTEGER NOT NULL,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
title TEXT NOT NULL,
body TEXT NOT NULL,
FOREIGN KEY (author_id) REFERENCES user (id)
);