-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embed the value objects #1241
Comments
@petmongrels have added deleting orphans to be run for Point also since for one of the users I tested there were 24L entries in fast sync vs actual 17k with fresh sync. Let me know if you think otherwise. |
@petmongrels if this card, played before this, need not handle cases where I ve mentioned 'would probably be removed before this story is played since its deprecated' in the above description. |
…tions for point and observation from old schema name to new schema name. every method in realm results proxy.
marked this as high risk. #1241 Testing with older dumps for multiple organisations may reveal issues apart from regular regression that will be needed of the mobile app. |
…ds to be migrated as older dumps may have the data and migration will run with existing database. deleted un-used model classes.
…nd VisitScheduleInterval removed from repo before deleting StringKeyNumericValue
…deleting the other deprecated models
Test cases successfully validated:
|
This story is in sequence to this spike. Model changes pushed to realm-embed branch. Also use the test in the commit in the spike.
Acceptance criteria:
Entities to update/migrate
-- Format
-- KeyValue
-- StringKeyNumericValue
-- Point
-- ChecklistItemStatus
-- Decision - would probably be removed before this story is played since its deprecated
-- Observation
-- VisitScheduleInterval - would probably be removed before this story is played since its deprecated
Not to be done because these are top level object, not referred by any other entity
-- EntityQueue
-- ConfigFile - would probably be removed before this story is played since its deprecated
-- BeneficiaryModePin
-- Extension
-- UserDefinedIndividualProperty - would probably be removed before this story is played since its deprecated
-- VisitScheduleConfig - would probably be removed before this story is played since its deprecated
migration is required like (in realm-embed model branch). schemaVersion number may have changed when the story is played.
deleting orphans can be done by changing the schema name. recommend doing it only for observations and Point. others are small entities. The change is present in the spike branch.
Calls to load emebdded object types directly have to be removed (e.g. db.object(Observation.schema.name) - file link). How to handle for the ones usage is found.
-- Observation in PruneMedia (change code to do this per parent entity)
Also calls like these to now delete embedded objects should be removed
it takes about 30 seconds to migrate observations in large database. Loading white screen is shown, we should modify this to say that 'Upgrading data, Please do not close the screen.'
-- This should happen when upgrading database after fast sync as well. Say fast sync is setup with schema version 180 and this change is in schema version 181. So after restoring db when executing this line migrations run.
Additional observations from spike:
name: "Format", embedded: true, properties: { regex: "string", descriptionKey: "string" }
sample test cases:
The text was updated successfully, but these errors were encountered: