From b63c2a5f10302a27d2a2b6ba8389a176ea96f507 Mon Sep 17 00:00:00 2001 From: Kiril Kovachev Date: Mon, 14 Oct 2024 12:05:20 +0100 Subject: [PATCH] Restore post schema --- kanken_online/schema.sql | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) 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) +);