diff --git a/kanken_online/schema.sql b/kanken_online/schema.sql index 90a6d19..7903187 100644 --- a/kanken_online/schema.sql +++ b/kanken_online/schema.sql @@ -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) +);