1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-27 03:12:21 -05:00

Added IF NOT EXISTS

This commit is contained in:
Justin Plock 2014-04-14 09:40:35 -04:00
parent df6c8b3be9
commit 44fd0faa23

View File

@ -1,10 +1,10 @@
CREATE TABLE config ( CREATE TABLE IF NOT EXISTS config (
id bigserial primary key, id bigserial primary key,
name varchar(255) NOT NULL, name varchar(255) NOT NULL,
value varchar(255) NOT NULL value varchar(255) NOT NULL
); );
CREATE TABLE entries ( CREATE TABLE IF NOT EXISTS entries (
id bigserial primary key, id bigserial primary key,
title varchar(255) NOT NULL, title varchar(255) NOT NULL,
url varchar(255) NOT NULL, url varchar(255) NOT NULL,
@ -14,7 +14,7 @@ CREATE TABLE entries (
user_id integer NOT NULL user_id integer NOT NULL
); );
CREATE TABLE users ( CREATE TABLE IF NOT EXISTS users (
id bigserial primary key, id bigserial primary key,
username varchar(255) NOT NULL, username varchar(255) NOT NULL,
password varchar(255) NOT NULL, password varchar(255) NOT NULL,
@ -22,19 +22,19 @@ CREATE TABLE users (
email varchar(255) NOT NULL email varchar(255) NOT NULL
); );
CREATE TABLE users_config ( CREATE TABLE IF NOT EXISTS users_config (
id bigserial primary key, id bigserial primary key,
user_id integer NOT NULL, user_id integer NOT NULL,
name varchar(255) NOT NULL, name varchar(255) NOT NULL,
value varchar(255) NOT NULL value varchar(255) NOT NULL
); );
CREATE TABLE tags ( CREATE TABLE IF NOT EXISTS tags (
id bigserial primary key, id bigserial primary key,
value varchar(255) NOT NULL value varchar(255) NOT NULL
); );
CREATE TABLE tags_entries ( CREATE TABLE IF NOT EXISTS tags_entries (
id bigserial primary key, id bigserial primary key,
entry_id integer NOT NULL, entry_id integer NOT NULL,
tag_id integer NOT NULL tag_id integer NOT NULL