Support independent application migration versions.

This commit is contained in:
Greyson Parrelli
2019-09-05 14:39:18 -04:00
parent f81c0b448e
commit d1a6582ad7
11 changed files with 158 additions and 63 deletions

View File

@@ -535,6 +535,10 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
db.setVersion(DATABASE_VERSION);
}
public static boolean databaseFileExists(@NonNull Context context) {
return context.getDatabasePath(DATABASE_NAME).exists();
}
private void executeStatements(SQLiteDatabase db, String[] statements) {
for (String statement : statements)
db.execSQL(statement);