summaryrefslogtreecommitdiffstats
path: root/pica-client/main.cpp
diff options
context:
space:
mode:
authorAnton <anton@picapica>2016-09-04 00:55:58 +0400
committerAnton <anton@picapica>2016-09-04 00:55:58 +0400
commiteb9d793ca218f61169997f2efcd838c831b614ac (patch)
treeeb535ddb0395a50a2c4e13c1bd7d94ac3937b726 /pica-client/main.cpp
parentaea328fdd6663587cfb249e55394ac96010d07ba (diff)
downloadpica-pica-eb9d793ca218f61169997f2efcd838c831b614ac.tar.gz
pica-pica-eb9d793ca218f61169997f2efcd838c831b614ac.zip
fixed settings table creation query, make values unique
Diffstat (limited to 'pica-client/main.cpp')
-rw-r--r--pica-client/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/pica-client/main.cpp b/pica-client/main.cpp
index 018374b..99a19f2 100644
--- a/pica-client/main.cpp
+++ b/pica-client/main.cpp
@@ -138,7 +138,8 @@ static bool create_database()
query.exec("create table settings \
( \
name varchar(255) not null, \
- value varchar(255) not null \
+ value varchar(255) not null, \
+ constraint pk primary key (name) on conflict replace \
);"
);
@@ -378,7 +379,8 @@ static bool update_database()
query.exec("create table settings \
( \
name varchar(255) not null, \
- value varchar(255) not null \
+ value varchar(255) not null, \
+ constraint pk primary key (name) on conflict replace \
);"
);