diff --git a/library/src/main/java/com/readystatesoftware/sqliteasset/SQLiteAssetHelper.java b/library/src/main/java/com/readystatesoftware/sqliteasset/SQLiteAssetHelper.java index ebee1c9..27c58f8 100755 --- a/library/src/main/java/com/readystatesoftware/sqliteasset/SQLiteAssetHelper.java +++ b/library/src/main/java/com/readystatesoftware/sqliteasset/SQLiteAssetHelper.java @@ -179,6 +179,8 @@ public synchronized SQLiteDatabase getWritableDatabase() { // do force upgrade if (version != 0 && version < mForcedUpgradeVersion) { + //Close the old database + db.close(); db = createOrOpenDatabase(true); db.setVersion(mNewVersion); version = db.getVersion();