/*
 * DO NOT EDIT DIRECTLY.
 *
 * This file was generated automatically by sqlite-helper-gen
 * from hissqlite/hissqlite-init.sql.
 *
 * DO NOT EDIT DIRECTLY.
 */


#include "hissqlite-init.h"

#ifdef HAVE_SQLITE3

sqlite_helper_t const hissqlite_init_helper =
{
    2,

    "create table hist (\n"
    "  hash  blob not null primary key, -- HashMessageID(): 16-byte MD5\n"
    "  arrived integer not null,      -- time_t\n"
    "  posted  integer,           -- time_t; 0/NULL if unknown\n"
    "  expires integer,           -- time_t article expiry; 0/NULL = none\n"
    "  token   blob             -- raw TOKEN (sizeof TOKEN);\n"
    ") without rowid;\n"
    "\n"
    "create index hist_remember on hist(posted, arrived) where token is null;\n"
    "\n"
    "create table misc (\n"
    "  key   text not null primary key,\n"
    "  value not null\n"
    ") without rowid;\n"
    "\000"
    "get_version\000"
    "select value from misc where key = 'version';\n"
    "\000"
    "set_version\000"
    "insert into misc(key, value) values('version', ?1)\n"
    "  on conflict(key) do update set value = excluded.value;\n"
    "\000"
};

#endif /* HAVE_SQLITE3 */

