Skip to content

Commit 656046b

Browse files
committed
Merge branch 'hotfix/db_upgrade'
2 parents bee9dc9 + 7d98df8 commit 656046b

File tree

7 files changed

+17
-7
lines changed

7 files changed

+17
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Change Log
22
===============================================================================
3+
Version 1.5.1 *(2014-10-08)*
4+
----------------------------
5+
* Fixed: Crash when upgrading from v1.4.x to v1.5.x
6+
37
Version 1.5.0 *(2014-10-01)*
48
----------------------------
59
* Need for speed! Lots of performance optimizations in the application

app/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
1919
package="org.gnucash.android"
20-
android:versionCode="42"
20+
android:versionCode="43"
2121
android:versionName="@string/app_version_name" >
2222

2323
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16"/>

app/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<description>Gnucash Android companion application</description>
2323

2424
<parent>
25-
<version>1.5.0-SNAPSHOT</version>
25+
<version>1.5.1-SNAPSHOT</version>
2626
<groupId>org.gnucash.android</groupId>
2727
<artifactId>gnucash-android-parent</artifactId>
2828
</parent>

app/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
1919
<string name="app_name">GnuCash</string>
20-
<string name="app_version_name">1.5.0</string>
20+
<string name="app_version_name">1.5.1</string>
2121
<string name="title_add_account">Create Account</string>
2222
<string name="title_edit_account">Edit Account</string>
2323
<string name="info_details">Info</string>

app/src/org/gnucash/android/db/DatabaseAdapter.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ public DatabaseAdapter(Context context) {
6262
mDbHelper = new DatabaseHelper(context);
6363
mContext = context.getApplicationContext();
6464
open();
65-
createTempView();
65+
66+
if (mDb.getVersion() >= DatabaseSchema.SPLITS_DB_VERSION) {
67+
createTempView();
68+
}
6669
}
6770

6871
/**
@@ -74,7 +77,10 @@ public DatabaseAdapter(SQLiteDatabase db) {
7477
this.mContext = GnuCashApplication.getAppContext();
7578
if (!db.isOpen() || db.isReadOnly())
7679
throw new IllegalArgumentException("Database not open or is read-only. Require writeable database");
77-
createTempView();
80+
81+
if (mDb.getVersion() >= DatabaseSchema.SPLITS_DB_VERSION) {
82+
createTempView();
83+
}
7884
}
7985

8086
private void createTempView() {

integration-tests/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
1818
<modelVersion>4.0.0</modelVersion>
1919
<parent>
20-
<version>1.5.0-SNAPSHOT</version>
20+
<version>1.5.1-SNAPSHOT</version>
2121
<groupId>org.gnucash.android</groupId>
2222
<artifactId>gnucash-android-parent</artifactId>
2323
</parent>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
1919
<modelVersion>4.0.0</modelVersion>
20-
<version>1.5.0-SNAPSHOT</version>
20+
<version>1.5.1-SNAPSHOT</version>
2121
<groupId>org.gnucash.android</groupId>
2222
<artifactId>gnucash-android-parent</artifactId>
2323
<name>GnuCash Android parent</name>

0 commit comments

Comments
 (0)