aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-09-17 22:08:50 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-09-17 22:08:50 +0200
commit3e400c3df5572524b7ba08b030f45eb3ba6b7734 (patch)
treec7fd7a5d391649c7905ee685cfa7fe7b4498cf1b /Makefile
parent361bb55f01ba28960a8127b0a16c1e7a7a8de61a (diff)
downloadcforum-3e400c3df5572524b7ba08b030f45eb3ba6b7734.tar.gz
Add database helper functions
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 4e788a9..f6fdc96 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ cforum: $(C) $(TPL)
db:
sqlite3 db "CREATE TABLE settings(key, value, PRIMARY KEY (key));"
sqlite3 db "INSERT INTO settings values('name', 'C Forum');"
- sqlite3 db "CREATE TABLE users(name, hash NOT NULL, PRIMARY KEY (name));"
- sqlite3 db "INSERT INTO users values('john', '123');"
- sqlite3 db "CREATE TABLE posts(user INT NOT NULL, created INT NOT NULL, edited INT, subject NOT NULL, text NOT NULL, FOREIGN KEY (user) REFERENCES users(oid));"
- sqlite3 db "INSERT INTO posts values(1, 0, NULL, 'Hello World!', 'This is the first post.');" \ No newline at end of file
+ sqlite3 db "CREATE TABLE users(name, full, hash NOT NULL, PRIMARY KEY (name));"
+ sqlite3 db "INSERT INTO users values('john', 'John Ankarström', '123');"
+ sqlite3 db "CREATE TABLE posts(parent INT, user INT NOT NULL, created INT NOT NULL, edited INT, subject NOT NULL, text NOT NULL, FOREIGN KEY (user) REFERENCES users(oid));"
+ sqlite3 db "INSERT INTO posts values(NULL, 1, 1462137896, NULL, 'Hello World!', 'This is the first post.');" \ No newline at end of file