smr/src/sql/create_table_authors.sql

17 lines
454 B
SQL

/* md
@name sql/table/authors
If/when 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.
*/
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
);