/* md
@name sql/table/authors
If an author deletes their account, all posts
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.
*/

/* sh
@name sql/table/authors
echo "digraph authors {" \
	"$(cat doc/schema/authors.dot)" \
	"}" | dot -Tsvg
*/
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
);
