From 09edf6c8b8b03689e5128e5ac1f221782a21648a Mon Sep 17 00:00:00 2001 From: Stefan Brand Date: Sat, 1 Feb 2014 13:06:07 +0100 Subject: [PATCH] Fix for GitLab Issue #3 Initial DB-Creation and DB-Update now both set the default values. --- qml/lib/storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qml/lib/storage.js b/qml/lib/storage.js index bda96e4..f555470 100644 --- a/qml/lib/storage.js +++ b/qml/lib/storage.js @@ -38,7 +38,7 @@ function getDB() { // Initialize an empty DB, Create the Table db.changeVersion("", "2", function(tx) { - tx.executeSql("CREATE TABLE IF NOT EXISTS OTPStorage(title TEXT, secret TEXT, type TEXT, counter INTEGER, fav INTEGER);"); + tx.executeSql("CREATE TABLE IF NOT EXISTS OTPStorage(title TEXT, secret TEXT, type TEXT DEFAULT 'TOPT', counter INTEGER DEFAULT 0, fav INTEGER DEFAULT 0);"); } ); } else if (db.version == "1.0") {