1 CREATE TABLE users (
     2     id INTEGER PRIMARY KEY, -- is alias of SQLite's rowid
     3     name,
     4     login
     5 );
     6 
     7 CREATE TABLE posts (
     8     user INTEGER, -- users.id
     9     txt TEXT, 
    10     parent INTEGER, -- Not used. Haven't needed replies yet.
    11     posted INTEGER, -- unix epoch
    12     updated INTEGER, -- unix epoch
    13     touched INTEGER, -- Counter, updates on edit/react
    14     filename TEXT
    15 );
    16 
    17 -- For 2.6 -> 3.0, add 'touched' column (run this)
    18 -- ALTER TABLE ADD COLUMN touched int;
    19 -- UPDATE posts SET touched = rowid;
    20 
    21 -- Added in v3.0
    22 CREATE TABLE reactions (
    23     post INTEGER, -- posts.rowid
    24     user INTEGER, -- users.id
    25     emoji TEXT,
    26     txt TEXT
    27 );
    28