|
|
@ -38,7 +38,7 @@ public class Database extends AbstractDatabase {
|
|
|
|
* Database version number. This variable must be updated when database
|
|
|
|
* Database version number. This variable must be updated when database
|
|
|
|
* tables are updated, as it determines whether a database needs updating.
|
|
|
|
* tables are updated, as it determines whether a database needs updating.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static final int VERSION = 22;
|
|
|
|
public static final int VERSION = 23;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Database name (must be unique)
|
|
|
|
* Database name (must be unique)
|
|
|
@ -295,9 +295,6 @@ public class Database extends AbstractDatabase {
|
|
|
|
Log.e("astrid", "db-upgrade-" + oldVersion + "-" + newVersion, e);
|
|
|
|
Log.e("astrid", "db-upgrade-" + oldVersion + "-" + newVersion, e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 21: try {
|
|
|
|
case 21: try {
|
|
|
|
database.execSQL(createTableSql(visitor, User.TABLE.name, User.PROPERTIES));
|
|
|
|
|
|
|
|
onCreateTables();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(Property<?> property : new Property<?>[] { Update.OTHER_USER_ID, Update.OTHER_USER })
|
|
|
|
for(Property<?> property : new Property<?>[] { Update.OTHER_USER_ID, Update.OTHER_USER })
|
|
|
|
database.execSQL("ALTER TABLE " + Update.TABLE.name + " ADD " +
|
|
|
|
database.execSQL("ALTER TABLE " + Update.TABLE.name + " ADD " +
|
|
|
|
property.accept(visitor, null));
|
|
|
|
property.accept(visitor, null));
|
|
|
@ -306,6 +303,12 @@ public class Database extends AbstractDatabase {
|
|
|
|
catch (SQLiteException e) {
|
|
|
|
catch (SQLiteException e) {
|
|
|
|
Log.e("astrid", "db-upgrade-" + oldVersion + "-" + newVersion, e);
|
|
|
|
Log.e("astrid", "db-upgrade-" + oldVersion + "-" + newVersion, e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
case 22: try {
|
|
|
|
|
|
|
|
database.execSQL(createTableSql(visitor, User.TABLE.name, User.PROPERTIES));
|
|
|
|
|
|
|
|
onCreateTables();
|
|
|
|
|
|
|
|
} catch (SQLiteException e) {
|
|
|
|
|
|
|
|
Log.e("astrid", "db-upgrade-" + oldVersion + "-" + newVersion, e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|