From 9489e7a6fd0440acb26a65ad04637b7bd0c93fe7 Mon Sep 17 00:00:00 2001 From: Ngewi Fet Date: Wed, 8 Oct 2014 16:36:02 +0200 Subject: [PATCH 1/2] Only create SQL views for database version 7 and above --- app/src/org/gnucash/android/db/DatabaseAdapter.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/org/gnucash/android/db/DatabaseAdapter.java b/app/src/org/gnucash/android/db/DatabaseAdapter.java index 24bf926d0..073f829aa 100644 --- a/app/src/org/gnucash/android/db/DatabaseAdapter.java +++ b/app/src/org/gnucash/android/db/DatabaseAdapter.java @@ -62,7 +62,10 @@ public DatabaseAdapter(Context context) { mDbHelper = new DatabaseHelper(context); mContext = context.getApplicationContext(); open(); - createTempView(); + + if (mDb.getVersion() >= DatabaseSchema.SPLITS_DB_VERSION) { + createTempView(); + } } /** @@ -74,7 +77,10 @@ public DatabaseAdapter(SQLiteDatabase db) { this.mContext = GnuCashApplication.getAppContext(); if (!db.isOpen() || db.isReadOnly()) throw new IllegalArgumentException("Database not open or is read-only. Require writeable database"); - createTempView(); + + if (mDb.getVersion() >= DatabaseSchema.SPLITS_DB_VERSION) { + createTempView(); + } } private void createTempView() { From 7d98df85f657b511d58d64d2e69ae8a3e284d947 Mon Sep 17 00:00:00 2001 From: Ngewi Fet Date: Wed, 8 Oct 2014 16:56:44 +0200 Subject: [PATCH 2/2] Updated version strings for v1.5.1 release --- CHANGELOG.md | 4 ++++ app/AndroidManifest.xml | 2 +- app/pom.xml | 2 +- app/res/values/strings.xml | 2 +- integration-tests/pom.xml | 2 +- pom.xml | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df104618d..481f7a9be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ Change Log =============================================================================== +Version 1.5.1 *(2014-10-08)* +---------------------------- +* Fixed: Crash when upgrading from v1.4.x to v1.5.x + Version 1.5.0 *(2014-10-01)* ---------------------------- * Need for speed! Lots of performance optimizations in the application diff --git a/app/AndroidManifest.xml b/app/AndroidManifest.xml index 9985b6dad..bb5e85fb3 100644 --- a/app/AndroidManifest.xml +++ b/app/AndroidManifest.xml @@ -17,7 +17,7 @@ diff --git a/app/pom.xml b/app/pom.xml index 534877eab..1d5b95158 100644 --- a/app/pom.xml +++ b/app/pom.xml @@ -22,7 +22,7 @@ Gnucash Android companion application - 1.5.0-SNAPSHOT + 1.5.1-SNAPSHOT org.gnucash.android gnucash-android-parent diff --git a/app/res/values/strings.xml b/app/res/values/strings.xml index 594b7a419..94988cebe 100644 --- a/app/res/values/strings.xml +++ b/app/res/values/strings.xml @@ -17,7 +17,7 @@ GnuCash - 1.5.0 + 1.5.1 Create Account Edit Account Info diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 7bfb05127..b58439508 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -17,7 +17,7 @@ 4.0.0 - 1.5.0-SNAPSHOT + 1.5.1-SNAPSHOT org.gnucash.android gnucash-android-parent diff --git a/pom.xml b/pom.xml index bd8b298ee..18ad16716 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ 4.0.0 - 1.5.0-SNAPSHOT + 1.5.1-SNAPSHOT org.gnucash.android gnucash-android-parent GnuCash Android parent