Skip to content

Commit 2404709

Browse files
authored
Finish openimis/migration_script_optimization
Optimization: Changed the isOffline=0 update to affect only different values
2 parents 4025c91 + 7f8fae7 commit 2404709

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Migration script/openIMIS migration latest.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4274,11 +4274,11 @@ Go
42744274
-- OP-281: Set isOffline status to 0 for insurees in database
42754275
IF NOT EXISTS (SELECT 1 FROM tblIMISDefaults where OfflineCHF = 1 OR OfflineHF = 1)
42764276
BEGIN
4277-
UPDATE tblInsuree SET isOffline=0
4278-
UPDATE tblFamilies SET isOffline=0
4279-
UPDATE tblInsureePolicy SET isOffline=0
4280-
UPDATE tblPremium SET isOffline=0
4281-
UPDATE tblPolicy SET isOffline=0
4277+
UPDATE tblInsuree SET isOffline=0 where isOffline is NULL or isOffline<>0
4278+
UPDATE tblFamilies SET isOffline=0 where isOffline is NULL or isOffline<>0
4279+
UPDATE tblInsureePolicy SET isOffline=0 where isOffline is NULL or isOffline<>0
4280+
UPDATE tblPremium SET isOffline=0 where isOffline is NULL or isOffline<>0
4281+
UPDATE tblPolicy SET isOffline=0 where isOffline is NULL or isOffline<>0
42824282
END
42834283

42844284
-- ready status support

0 commit comments

Comments
 (0)