Skip to content

Commit

Permalink
Merge pull request #975 from PhenoApps/database_hotfix_version_11
Browse files Browse the repository at this point in the history
hotfix for database upgrading issue
  • Loading branch information
trife authored May 20, 2024
2 parents f304583 + 12cc197 commit 90a77a3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2772,7 +2772,11 @@ public void onCreate(SQLiteDatabase db) {
Log.e(TAG, e.getMessage());
}

//migrate handles database upgrade from 8 -> 9
Migrator.Companion.createTables(db, getAllTraitObjects(db));

//this will force new databases to have full updates, otherwise sqliteopenhelper will not upgrade
onUpgrade(db, 9, DATABASE_VERSION);
}

/**
Expand Down Expand Up @@ -2962,7 +2966,7 @@ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

}

if (oldVersion <= 10 & newVersion >= 11) {
if (oldVersion <= 10 && newVersion >= 11) {

// modify studies table for better handling of brapi study attributes
db.execSQL("ALTER TABLE studies ADD COLUMN import_format TEXT");
Expand Down

0 comments on commit 90a77a3

Please sign in to comment.