Browse Source

Bug fix token not in the default database creation

tags/release_v1
Schoumi 5 years ago
parent
commit
c7adb7937c
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      app/build.gradle
  2. +3
    -3
      app/src/main/java/fr/mobdev/goblim/Database.java

+ 1
- 1
app/build.gradle View File

@@ -8,7 +8,7 @@ android {
applicationId "fr.mobdev.goblim"
minSdkVersion 11
targetSdkVersion 22
versionCode 1
versionCode 2
versionName "1.0"
}
buildTypes {


+ 3
- 3
app/src/main/java/fr/mobdev/goblim/Database.java View File

@@ -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);");
}


Loading…
Cancel
Save