aboutsummaryrefslogtreecommitdiff
path: root/sources/potlatch/pre.sql
blob: 35d8c9dc7faa6fd84865049cdbd84a67086ee7ba (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--
--  Taginfo source: Potlatch
--
--  pre.sql
--

.bail ON

INSERT INTO source (id, name, update_start, data_until) SELECT 'potlatch', 'Potlatch', datetime('now'), datetime('now');

--
--  categories
--

DROP TABLE IF EXISTS categories;

CREATE TABLE categories (
    id   TEXT,
    name TEXT
);

--
--  features
--

DROP TABLE IF EXISTS features;

CREATE TABLE features (
    name            TEXT,
    category_id     TEXT REFERENCES categories (id),
    category_name   TEXT,
    help            TEXT,
    on_point        INTEGER,
    on_line         INTEGER,
    on_area         INTEGER,
    on_relation     INTEGER,
    icon_image      TEXT,
    icon_foreground TEXT,
    icon_background TEXT
);

--
--  tags
--

DROP TABLE IF EXISTS tags;

CREATE TABLE tags (
    key          TEXT,
    value        TEXT,
    feature_name REFERENCES features (name)
);