mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
parent
c0da061072
commit
2c82b3610d
@ -136,6 +136,7 @@ public class DatabaseFactory {
|
||||
|
||||
public static void upgradeRestored(Context context, SQLiteDatabase database){
|
||||
getInstance(context).databaseHelper.onUpgrade(database, database.getVersion(), -1);
|
||||
getInstance(context).databaseHelper.markCurrent(database);
|
||||
}
|
||||
|
||||
private DatabaseFactory(@NonNull Context context) {
|
||||
|
@ -185,6 +185,10 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
||||
return getWritableDatabase(databaseSecret.asString());
|
||||
}
|
||||
|
||||
public void markCurrent(SQLiteDatabase db) {
|
||||
db.setVersion(DATABASE_VERSION);
|
||||
}
|
||||
|
||||
private void executeStatements(SQLiteDatabase db, String[] statements) {
|
||||
for (String statement : statements)
|
||||
db.execSQL(statement);
|
||||
|
Loading…
Reference in New Issue
Block a user