diff options
author | John Ankarström <john@ankarstrom.se> | 2021-09-18 01:52:04 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-09-18 01:52:04 +0200 |
commit | 24bf14f6653ebf1c1ba79b9f212d35417bb6acbf (patch) | |
tree | 913a0f1bebf835a1109652b1c61d363972ee9a28 /Makefile | |
parent | e25f56cbe86041d4ab19e474e38032fa7e681ac7 (diff) | |
download | cforum-24bf14f6653ebf1c1ba79b9f212d35417bb6acbf.tar.gz |
Implement attachments
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -18,4 +18,6 @@ db: 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.');" - sqlite3 db "INSERT INTO posts values(1, 1, 1462138896, NULL, 'Re: Hello World!', 'This is the second post!');"
\ No newline at end of file + sqlite3 db "INSERT INTO posts values(1, 1, 1462138896, NULL, 'Re: Hello World!', 'This is the second post!');" + sqlite3 db "CREATE TABLE attachments(post INT NOT NULL, name NOT NULL, description, mime NOT NULL, data BLOB, FOREIGN KEY (post) REFERENCES posts(oid));" + sqlite3 db "$$(printf "INSERT INTO attachments values(1, 'example', 'Some example shell code.', 'text/plain', '#!/bin/sh\necho Hello World!');")"
\ No newline at end of file |