From 57f447d372306499db978e9360417418e2ebda5e Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 12 Apr 2017 18:44:39 +0100 Subject: [PATCH] Requery: Don't destroy and recreate db when updating. --- app/src/main/java/com/etesync/syncadapter/App.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/src/main/java/com/etesync/syncadapter/App.java b/app/src/main/java/com/etesync/syncadapter/App.java index 3c6a1a5c..e567f09c 100644 --- a/app/src/main/java/com/etesync/syncadapter/App.java +++ b/app/src/main/java/com/etesync/syncadapter/App.java @@ -228,10 +228,6 @@ public class App extends Application { if (dataStore == null) { // override onUpgrade to handle migrating to a new version 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(); dataStore = new EntityDataStore<>(configuration); }