diff options
Diffstat (limited to 'schema.sql')
| -rw-r--r-- | schema.sql | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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) +); |
