Skip to content

Commit 7866048

Browse files
authored
Merge pull request #1775 from opensrp/fix/stage_server_changes
Update stage server
2 parents 5e57ebe + a2f4324 commit 7866048

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

opensrp-chw/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,15 @@ android {
256256
buildConfigField "String", 'opensrp_url', '"https://wcaro-guinea.smartregister.org/opensrp/"'
257257
buildConfigField "String", 'guidebooks_url', '"https://opensrp.s3.amazonaws.com/media/guinea/"'
258258
buildConfigField "String", 'opensrp_url_preview', '"https://wcaro-guinea-preview.smartregister.org/opensrp/"'
259-
buildConfigField "String", 'opensrp_url_debug', '"https://unicefwcaro-stage.smartregister.org/opensrp/"'
259+
buildConfigField "String", 'opensrp_url_debug', '"https://wcaro-stage.smartregister.org/opensrp/"'
260260
buildConfigField "String[]", "LOCATION_HIERACHY", '{"Country" , "Region" , "Prefecture" , "Commune" , "Health Facility" , "Village"}'
261261
buildConfigField "String[]", "ALLOWED_LOCATION_LEVELS_PREVIEW", '{"Health Facility" , "Village"}'
262262
buildConfigField "String[]", "ALLOWED_LOCATION_LEVELS_DEBUG", '{"Country", "Clinic" , "CHSS" , "CHA", "Supervisor", "CHW"}'
263263
buildConfigField "String[]", "ALLOWED_LOCATION_LEVELS", '{"Health Facility" , "Village"}'
264264
buildConfigField "String", 'DEFAULT_LOCATION_PREVIEW', '"Village"'
265265
buildConfigField "String", 'DEFAULT_LOCATION_DEBUG', '"CHW"'
266266
buildConfigField "String", 'DEFAULT_LOCATION', '"Village"'
267-
buildConfigField "int", "DATABASE_VERSION", '6'
267+
buildConfigField "int", "DATABASE_VERSION", '7'
268268
}
269269
togo {
270270
dimension = 'baseDimension'
@@ -289,13 +289,13 @@ android {
289289
versionName "0.1.12"
290290
buildConfigField "String", 'opensrp_url', '"https://wcaro-liberia.smartregister.org/opensrp/"'
291291
buildConfigField "String", 'guidebooks_url', '"https://opensrp.s3.amazonaws.com/media/liberia/"'
292-
buildConfigField "String", 'opensrp_url_debug', '"https://unicefwcaro-stage.smartregister.org/opensrp/"'
292+
buildConfigField "String", 'opensrp_url_debug', '"https://wcaro-stage.smartregister.org/opensrp/"'
293293
buildConfigField "String[]", "LOCATION_HIERACHY", '{"Clinic" , "CHSS" , "CHA"}'
294294
buildConfigField "String[]", "ALLOWED_LOCATION_LEVELS", '{"Country" , "County" , "District", "Clinics", "CHSS", "Village"}'
295295
buildConfigField "String[]", "ALLOWED_LOCATION_LEVELS_DEBUG", '{"Clinic" , "CHSS" , "CHA"}'
296296
buildConfigField "String", 'DEFAULT_LOCATION', '"Village"'
297297
buildConfigField "String", 'DEFAULT_LOCATION_DEBUG', '"CHA"'
298-
buildConfigField "int", "DATABASE_VERSION", '5'
298+
buildConfigField "int", "DATABASE_VERSION", '6'
299299
}
300300
lmh {
301301
dimension = 'baseDimension'

opensrp-chw/src/guinea/java/org/smartregister/chw/repository/ChwRepositoryFlv.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import net.sqlcipher.database.SQLiteDatabase;
66

7+
import org.smartregister.chw.anc.repository.VisitRepository;
78
import org.smartregister.chw.core.repository.ScheduleRepository;
89
import org.smartregister.chw.util.RepositoryUtils;
910
import org.smartregister.domain.db.Column;
@@ -43,6 +44,9 @@ public static void onUpgrade(Context context, SQLiteDatabase db, int oldVersion,
4344
case 6:
4445
upgradeToVersion6(context, db);
4546
break;
47+
case 7:
48+
upgradeToVersion7(db);
49+
break;
4650
default:
4751
break;
4852
}
@@ -135,4 +139,13 @@ private static void upgradeToVersion6(Context context, SQLiteDatabase db) {
135139
}
136140
}
137141

142+
private static void upgradeToVersion7(SQLiteDatabase db) {
143+
try {
144+
db.execSQL(VisitRepository.ADD_VISIT_GROUP_COLUMN);
145+
} catch (Exception e) {
146+
Timber.e(e, "upgradeToVersion7");
147+
}
148+
}
149+
150+
138151
}

opensrp-chw/src/liberia/java/org/smartregister/chw/repository/ChwRepositoryFlv.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import net.sqlcipher.database.SQLiteDatabase;
66

7+
import org.smartregister.chw.anc.repository.VisitRepository;
78
import org.smartregister.chw.util.RepositoryUtils;
89
import org.smartregister.domain.db.Column;
910
import org.smartregister.immunization.repository.RecurringServiceRecordRepository;
@@ -39,6 +40,9 @@ public static void onUpgrade(Context context, SQLiteDatabase db, int oldVersion,
3940
case 5:
4041
upgradeToVersion5(context, db);
4142
break;
43+
case 6:
44+
upgradeToVersion7(db);
45+
break;
4246
default:
4347
break;
4448
}
@@ -122,4 +126,12 @@ private static void upgradeToVersion5(Context context, SQLiteDatabase db) {
122126
Timber.e(e);
123127
}
124128
}
129+
130+
private static void upgradeToVersion7(SQLiteDatabase db) {
131+
try {
132+
db.execSQL(VisitRepository.ADD_VISIT_GROUP_COLUMN);
133+
} catch (Exception e) {
134+
Timber.e(e, "upgradeToVersion7");
135+
}
136+
}
125137
}

0 commit comments

Comments
 (0)