Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion opensrp-chw/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ android {
buildConfigField "String", 'DEFAULT_LOCATION', '"VILLAGE/COMMUNAUTE"'
buildConfigField "int", "MAX_CONNECTION_TIMEOUT", '5'
buildConfigField "int", "MAX_READ_TIMEOUT", '5'
buildConfigField "int", "DATABASE_VERSION", '12'
buildConfigField "int", "DATABASE_VERSION", '13'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Label the PR to indicate the update is for DRC only

}
guinea {
dimension = 'baseDimension'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public static void onUpgrade(Context context, SQLiteDatabase db, int oldVersion,
case 12:
upgradeToVersion12(db);
break;
case 13:
upgradeToVersion13(db);
default:
break;
}
Expand Down Expand Up @@ -165,4 +167,9 @@ private static void upgradeToVersion11(SQLiteDatabase db) {
private static void upgradeToVersion12(SQLiteDatabase db) {
RepositoryUtils.updateNullEventIds(db);
}

private static void upgradeToVersion13 (SQLiteDatabase db)
{
RepositoryUtils.updateClientValidateStatus(db);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,9 @@ static String getEventId(String jsonString) {
return eventId;
}

static void updateClientValidateStatus (SQLiteDatabase db)
{
db.execSQL("UPDATE client Set validationStatus = 'Invalid'");
}
Comment on lines +137 to +138
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to use constants for the field and field value in this query to limit mistakes


}