Commit c7adb793 authored by Schoumi's avatar Schoumi

Bug fix token not in the default database creation

parent 8fcedd5b
......@@ -8,7 +8,7 @@ android {
applicationId "fr.mobdev.goblim"
minSdkVersion 11
targetSdkVersion 22
versionCode 1
versionCode 2
versionName "1.0"
}
buildTypes {
......
......@@ -43,7 +43,7 @@ public class Database extends SQLiteOpenHelper {
public static Database getInstance(Context context)
{
if(instance == null)
instance = new Database(context, "Lutim.db", null, 2);
instance = new Database(context, "Lutim.db", null, 3);
return instance;
}
......@@ -54,7 +54,7 @@ public class Database extends SQLiteOpenHelper {
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("Create table if not exists history (" +
"id integer primary key autoincrement, url varchar(1024), short_hash varchar(1024), real_short_hash varchar(1024), date INTEGER, storage_duration INTEGER ,thumb TEXT);");
"id integer primary key autoincrement, url varchar(1024), short_hash varchar(1024), real_short_hash varchar(1024), date INTEGER, storage_duration INTEGER ,thumb TEXT, token varchar(1024));");
db.execSQL("Create table if not exists servers (" +
"id integer primary key autoincrement, url varchar(1024), isDefault INTEGER);");
......@@ -70,7 +70,7 @@ public class Database extends SQLiteOpenHelper {
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
if(oldVersion == 1)
if(oldVersion == 2)
{
db.execSQL("Alter table history add column token varchar(1024);");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment