diff options
author | John Ankarström <john@ankarstrom.se> | 2021-09-17 22:08:50 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-09-17 22:08:50 +0200 |
commit | 3e400c3df5572524b7ba08b030f45eb3ba6b7734 (patch) | |
tree | c7fd7a5d391649c7905ee685cfa7fe7b4498cf1b /Makefile | |
parent | 361bb55f01ba28960a8127b0a16c1e7a7a8de61a (diff) | |
download | cforum-3e400c3df5572524b7ba08b030f45eb3ba6b7734.tar.gz |
Add database helper functions
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |