1
0
Fork 0
mirror of https://github.com/seiichiro0185/sailotp.git synced 2024-05-18 08:30:54 +00:00

Fix for GitLab Issue #3

Initial DB-Creation and DB-Update now both set the default values.
This commit is contained in:
seiichiro 2014-02-01 13:06:07 +01:00
parent 99c3f83db7
commit 09edf6c8b8

View file

@ -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") {