Skip to content

Commit

Permalink
Fix for the wrong form record storage model used during update. Affec…
Browse files Browse the repository at this point in the history
…ts updating from significantly older versions to the newest version
  • Loading branch information
ctsims committed Jul 17, 2017
1 parent 1edfcc2 commit 3016330
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -406,15 +406,15 @@ private boolean upgradeThirteenFourteen(SQLiteDatabase db) {

db.beginTransaction();
try {
SqlStorage<FormRecord> formRecordSqlStorage = new SqlStorage<>(
SqlStorage<FormRecordV2> formRecordSqlStorage = new SqlStorage<>(
FormRecord.STORAGE_KEY,
FormRecord.class,
FormRecordV2.class,
new ConcreteAndroidDbHelper(c, db));

// Re-store all the form records, forcing new date representation
// to be used. Must happen proactively because the date parsing
// code was updated to handle new representation
for (FormRecord formRecord : formRecordSqlStorage) {
for (FormRecordV2 formRecord : formRecordSqlStorage) {
formRecordSqlStorage.write(formRecord);
}

Expand Down

0 comments on commit 3016330

Please sign in to comment.