2023-05-17 23:18:24 +02:00
|
|
|
/* md
|
|
|
|
@name sql/table/authors
|
2023-08-10 00:28:48 +02:00
|
|
|
If an author deletes their account, all posts
|
2023-05-17 23:18:24 +02:00
|
|
|
and comments by that author are also deleted (on
|
|
|
|
delete cascade) this is intentional. This also
|
|
|
|
means that all comments by other users on a post
|
|
|
|
an author makes will also be deleted.
|
|
|
|
*/
|
2023-08-10 00:28:48 +02:00
|
|
|
|
|
|
|
/* sh
|
|
|
|
@name sql/table/authors
|
|
|
|
echo "digraph authors {" \
|
|
|
|
"$(cat doc/schema/authors.dot)" \
|
|
|
|
"}" | dot -Tsvg
|
|
|
|
*/
|
2020-05-17 18:05:00 +02:00
|
|
|
CREATE TABLE IF NOT EXISTS authors (
|
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
|
|
name TEXT UNIQUE ON CONFLICT FAIL,
|
|
|
|
salt BLOB,
|
|
|
|
passhash BLOB,
|
|
|
|
joindate INTEGER,
|
|
|
|
biography TEXT
|
|
|
|
);
|