summaryrefslogtreecommitdiff
path: root/sources/init.sql
blob: e188915d45cdec274c1770dd18aea082a292f460 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--
--  init.sql
--
--  Initialize source database
--

.bail ON

--
-- Contains metadata about this source.
--
DROP TABLE IF EXISTS source;
CREATE TABLE source (
    id           TEXT,
    name         TEXT,
    update_start TEXT,
    update_end   TEXT,
    data_until   TEXT
);

--
-- Contains general statistical data for this source.
--
DROP TABLE IF EXISTS stats;
CREATE TABLE stats (
    key   TEXT,
    value INT64
);