summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2013-04-09 13:24:40 +0200
committerYorhel <git@yorhel.nl>2013-04-09 13:26:08 +0200
commitaadd42744bb020d050968562358ff5285093c864 (patch)
treec75f1773026364798e5fb542328182a9c4a62f86
parent908571fd65e74837f8cd42b2164f2987849a9e68 (diff)
db.c: Use NONE column type for 'value' columns
This way I get an integer back when I store an integer. (I should be increasing the user_version with this and add the required queries for updating. But that's kinda overkill as at this point. Especially regarding the hub_vars table, I haven't even pushed that commit yet.)
-rw-r--r--src/db.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db.c b/src/db.c
index accfe51..a5b787b 100644
--- a/src/db.c
+++ b/src/db.c
@@ -40,14 +40,14 @@ static struct { int fromver, tover; const char *sql; } schema[] = {
{ 0, 0,
"CREATE TABLE vars ("
"name TEXT NOT NULL PRIMARY KEY,"
- "value TEXT NOT NULL"
+ "value NONE NOT NULL"
")"
},
{ 0, 1,
"CREATE TABLE hub_vars ("
"hub INTEGER NOT NULL,"
"name TEXT NOT NULL,"
- "value TEXT NOT NULL,"
+ "value NONE NOT NULL,"
"PRIMARY KEY(hub, name)"
")"
}