2014-04-14 13:40:35 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS config (
|
2013-08-07 13:46:17 +00:00
|
|
|
id bigserial primary key,
|
|
|
|
name varchar(255) NOT NULL,
|
|
|
|
value varchar(255) NOT NULL
|
|
|
|
);
|
|
|
|
|
2014-04-14 13:40:35 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS entries (
|
2013-08-07 13:46:17 +00:00
|
|
|
id bigserial primary key,
|
|
|
|
title varchar(255) NOT NULL,
|
|
|
|
url varchar(255) NOT NULL,
|
|
|
|
is_read boolean DEFAULT false,
|
|
|
|
is_fav boolean DEFAULT false,
|
|
|
|
content TEXT,
|
|
|
|
user_id integer NOT NULL
|
|
|
|
);
|
|
|
|
|
2014-04-14 13:40:35 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS users (
|
2013-08-07 13:46:17 +00:00
|
|
|
id bigserial primary key,
|
|
|
|
username varchar(255) NOT NULL,
|
|
|
|
password varchar(255) NOT NULL,
|
|
|
|
name varchar(255) NOT NULL,
|
|
|
|
email varchar(255) NOT NULL
|
|
|
|
);
|
|
|
|
|
2014-04-14 13:40:35 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS users_config (
|
2013-08-07 13:46:17 +00:00
|
|
|
id bigserial primary key,
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
name varchar(255) NOT NULL,
|
|
|
|
value varchar(255) NOT NULL
|
2013-12-06 14:16:02 +00:00
|
|
|
);
|
|
|
|
|
2014-04-14 13:40:35 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS tags (
|
2013-12-06 14:16:02 +00:00
|
|
|
id bigserial primary key,
|
|
|
|
value varchar(255) NOT NULL
|
|
|
|
);
|
|
|
|
|
2014-04-14 13:40:35 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS tags_entries (
|
2013-12-06 14:16:02 +00:00
|
|
|
id bigserial primary key,
|
|
|
|
entry_id integer NOT NULL,
|
|
|
|
tag_id integer NOT NULL
|
2014-04-14 13:40:35 +00:00
|
|
|
)
|