]>
Commit | Line | Data |
---|---|---|
44fd0faa | 1 | CREATE TABLE IF NOT EXISTS config ( |
580d60b9 NL |
2 | id bigserial primary key, |
3 | name varchar(255) NOT NULL, | |
4 | value varchar(255) NOT NULL | |
5 | ); | |
6 | ||
44fd0faa | 7 | CREATE TABLE IF NOT EXISTS entries ( |
580d60b9 NL |
8 | id bigserial primary key, |
9 | title varchar(255) NOT NULL, | |
10 | url varchar(255) NOT NULL, | |
11 | is_read boolean DEFAULT false, | |
12 | is_fav boolean DEFAULT false, | |
13 | content TEXT, | |
14 | user_id integer NOT NULL | |
15 | ); | |
16 | ||
44fd0faa | 17 | CREATE TABLE IF NOT EXISTS users ( |
580d60b9 NL |
18 | id bigserial primary key, |
19 | username varchar(255) NOT NULL, | |
20 | password varchar(255) NOT NULL, | |
21 | name varchar(255) NOT NULL, | |
22 | email varchar(255) NOT NULL | |
23 | ); | |
24 | ||
44fd0faa | 25 | CREATE TABLE IF NOT EXISTS users_config ( |
580d60b9 NL |
26 | id bigserial primary key, |
27 | user_id integer NOT NULL, | |
28 | name varchar(255) NOT NULL, | |
29 | value varchar(255) NOT NULL | |
6bf47026 NL |
30 | ); |
31 | ||
44fd0faa | 32 | CREATE TABLE IF NOT EXISTS tags ( |
6bf47026 NL |
33 | id bigserial primary key, |
34 | value varchar(255) NOT NULL | |
35 | ); | |
36 | ||
44fd0faa | 37 | CREATE TABLE IF NOT EXISTS tags_entries ( |
6bf47026 NL |
38 | id bigserial primary key, |
39 | entry_id integer NOT NULL, | |
40 | tag_id integer NOT NULL | |
44fd0faa | 41 | ) |