aboutsummaryrefslogtreecommitdiffstats
path: root/schema.sql
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2012-11-07 17:37:06 +0100
committerThibaut Horel <thibaut.horel@gmail.com>2012-11-07 17:37:06 +0100
commit1225be7b79ed98873a51729635e4b18f622da3da (patch)
treec24ffbcce1239fcfe5d66bd1908f7a185573b675 /schema.sql
parenta3a62275ac16c4a887c6d054508d26d04a7d8558 (diff)
downloadfamille-flask-1225be7b79ed98873a51729635e4b18f622da3da.tar.gz
Add comments feature: show list, add
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql11
1 files changed, 11 insertions, 0 deletions
diff --git a/schema.sql b/schema.sql
index 2119322..43e4822 100644
--- a/schema.sql
+++ b/schema.sql
@@ -14,3 +14,14 @@ create table news (
user_id integer,
FOREIGN KEY(user_id) REFERENCES users(id)
);
+
+drop table if exists comments;
+create table comments (
+ id integer primary key autoincrement,
+ date string default (strftime('%Y-%m-%dT%H:%M:%S','now')),
+ content string not null,
+ user_id integer,
+ news_id integer,
+ FOREIGN KEY(user_id) REFERENCES users(id),
+ FOREIGN KEY(news_id) REFERENCES news(id)
+);