mirror of
https://github.com/etesync/android
synced 2025-01-11 00:01:12 +00:00
Requery: Don't destroy and recreate db when updating.
This commit is contained in:
parent
d80cce9aad
commit
57f447d372
@ -228,10 +228,6 @@ public class App extends Application {
|
|||||||
if (dataStore == null) {
|
if (dataStore == null) {
|
||||||
// override onUpgrade to handle migrating to a new version
|
// override onUpgrade to handle migrating to a new version
|
||||||
DatabaseSource source = new DatabaseSource(this, Models.DEFAULT, 1);
|
DatabaseSource source = new DatabaseSource(this, Models.DEFAULT, 1);
|
||||||
if (BuildConfig.DEBUG) {
|
|
||||||
// use this in development mode to drop and recreate the tables on every upgrade
|
|
||||||
source.setTableCreationMode(TableCreationMode.DROP_CREATE);
|
|
||||||
}
|
|
||||||
Configuration configuration = source.getConfiguration();
|
Configuration configuration = source.getConfiguration();
|
||||||
dataStore = new EntityDataStore<>(configuration);
|
dataStore = new EntityDataStore<>(configuration);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user