diff --git a/core/sql/0001_initial_schema.sql b/core/sql/0001_initial_schema.sql index 1139c94..4fbf2a9 100644 --- a/core/sql/0001_initial_schema.sql +++ b/core/sql/0001_initial_schema.sql @@ -22,10 +22,10 @@ create table items( id text not null, created int not null default (unixepoch()), active int not null, - title text, - author text, - body text, - link text, + title text not null, + author text not null, + body text not null, + link text not null, time int, ttl int, ttd int, @@ -42,7 +42,7 @@ create table channels( ) strict; create table password( id int not null, - hash text, + hash text not null, unique (id) on conflict replace ) strict; create table sessions( @@ -50,3 +50,12 @@ create table sessions( expires int default 0, primary key (id) ) strict; + +-- user introduction +insert into sources (name) values ('default'); +insert into channels (name, source) values ('home', 'default'); +insert into actions (source, name, argv) values ('default', 'fetch', jsonb('["true"]')); +insert into items (source, id, active, title, author, body, link, time, ttl, ttd, tts, action) + values ('default', 'welcome', 1, 'Welcome to intake!', 'intake', + '

Click the "X" button on this item to deactivate it and hide it from the feed.

', + '', 1, 0, 0, 0, jsonb('null'))