diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2012-11-07 01:27:36 +0100 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2012-11-07 01:27:36 +0100 |
| commit | df25a48abd69292af55f3356a48a737da829cd20 (patch) | |
| tree | fdb3ba7d659ee5dd379eb41b284bac6832a2d729 /schema.sql | |
| parent | e143cf83baf0c50da27251cee4f5e3a8929586a6 (diff) | |
| download | famille-flask-df25a48abd69292af55f3356a48a737da829cd20.tar.gz | |
Add basic news feature: list, show, add
Diffstat (limited to 'schema.sql')
| -rw-r--r-- | schema.sql | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -4,3 +4,13 @@ create table users ( name string not null, password string not null ); + +drop table if exists news; +create table news ( + id integer primary key autoincrement, + title string not null, + date string default (strftime('%Y-%m-%dT%H:%M:%S','now')), + content string not null, + user_id integer, + FOREIGN KEY(user_id) REFERENCES users(id) +); |
