aboutsummaryrefslogtreecommitdiffhomepage
path: root/install
diff options
context:
space:
mode:
authorJustin Plock <jplock@users.noreply.github.com>2014-04-14 09:40:35 -0400
committerJustin Plock <jplock@users.noreply.github.com>2014-04-14 09:40:35 -0400
commit44fd0faa23fc5abc2028c8400166c00b653e12b3 (patch)
tree8e05ee1c13c3f1deaec6f6379f2ded94b57260d6 /install
parentdf6c8b3be943676761992f6ee61fedb3548fad38 (diff)
downloadwallabag-44fd0faa23fc5abc2028c8400166c00b653e12b3.tar.gz
wallabag-44fd0faa23fc5abc2028c8400166c00b653e12b3.tar.zst
wallabag-44fd0faa23fc5abc2028c8400166c00b653e12b3.zip
Added IF NOT EXISTS
Diffstat (limited to 'install')
-rw-r--r--install/postgres.sql14
1 files changed, 7 insertions, 7 deletions
diff --git a/install/postgres.sql b/install/postgres.sql
index fe8f559c..1d73dfcb 100644
--- a/install/postgres.sql
+++ b/install/postgres.sql
@@ -1,10 +1,10 @@
1CREATE TABLE config ( 1CREATE TABLE IF NOT EXISTS config (
2 id bigserial primary key, 2 id bigserial primary key,
3 name varchar(255) NOT NULL, 3 name varchar(255) NOT NULL,
4 value varchar(255) NOT NULL 4 value varchar(255) NOT NULL
5); 5);
6 6
7CREATE TABLE entries ( 7CREATE TABLE IF NOT EXISTS entries (
8 id bigserial primary key, 8 id bigserial primary key,
9 title varchar(255) NOT NULL, 9 title varchar(255) NOT NULL,
10 url varchar(255) NOT NULL, 10 url varchar(255) NOT NULL,
@@ -14,7 +14,7 @@ CREATE TABLE entries (
14 user_id integer NOT NULL 14 user_id integer NOT NULL
15); 15);
16 16
17CREATE TABLE users ( 17CREATE TABLE IF NOT EXISTS users (
18 id bigserial primary key, 18 id bigserial primary key,
19 username varchar(255) NOT NULL, 19 username varchar(255) NOT NULL,
20 password varchar(255) NOT NULL, 20 password varchar(255) NOT NULL,
@@ -22,20 +22,20 @@ CREATE TABLE users (
22 email varchar(255) NOT NULL 22 email varchar(255) NOT NULL
23); 23);
24 24
25CREATE TABLE users_config ( 25CREATE TABLE IF NOT EXISTS users_config (
26 id bigserial primary key, 26 id bigserial primary key,
27 user_id integer NOT NULL, 27 user_id integer NOT NULL,
28 name varchar(255) NOT NULL, 28 name varchar(255) NOT NULL,
29 value varchar(255) NOT NULL 29 value varchar(255) NOT NULL
30); 30);
31 31
32CREATE TABLE tags ( 32CREATE TABLE IF NOT EXISTS tags (
33 id bigserial primary key, 33 id bigserial primary key,
34 value varchar(255) NOT NULL 34 value varchar(255) NOT NULL
35); 35);
36 36
37CREATE TABLE tags_entries ( 37CREATE TABLE IF NOT EXISTS tags_entries (
38 id bigserial primary key, 38 id bigserial primary key,
39 entry_id integer NOT NULL, 39 entry_id integer NOT NULL,
40 tag_id integer NOT NULL 40 tag_id integer NOT NULL
41) \ No newline at end of file 41)