smr/src/sql/create_table_raw_text.sql

22 lines
550 B
SQL

/* md
@name sql/table/raw_text
Store the raw text.
Used so people can edit their posts and get their original uploaded text.
Also used so users can download it,
maybe we can use it for "download as image" or "download as pdf" in the future.
Stored zlib compressed
*/
/* sh
@name sql/table/raw_text
echo "digraph comments{" \
"$(cat doc/schema/raw_text.dot)" \
"$(cat doc/schema/posts.dot)" \
"}" | dot -Tsvg
*/
CREATE TABLE IF NOT EXISTS raw_text (
id INTEGER PRIMARY KEY REFERENCES posts(id) ON DELETE CASCADE,
post_text BLOB,
markup TEXT
);