Closed mahalakshme closed 1 month ago
On discussion we found that the approach specified in #801 is not clean and could open up more issues than resolve. Therefore, we have decided to take a fall-forward approach and do the following:
For any further issues encountered during bundle upload or entity modifications, we'll follow a similar approach to fall forward through code fix and data migrations.
Code fix and DB migration done to update the existing database records to to use {"programs": [], "subjectTypes": [], "encounterTypes": []} instead of {} without updating the lastModifiedDateTime while ensuring we dont change the reportCards in-case there is no change.
select last_modified_date_time, age(last_modified_date_time, created_date_time) from dashboard_filter order by last_modified_date_time desc;
select last_modified_date_time, age(last_modified_date_time, created_date_time) from dashboard_section order by last_modified_date_time desc;
select last_modified_date_time, age(last_modified_date_time, created_date_time) from dashboard_section_card_mapping order by last_modified_date_time desc;
select last_modified_date_time, age(last_modified_date_time, created_date_time) from dashboard order by last_modified_date_time desc;
select last_modified_date_time, age(last_modified_date_time, created_date_time) from report_card order by last_modified_date_time desc;
Fix the last modified date time for updated report cards (or other entities) to created date time value, if it is greater than our end of life date.
@petmongrels one issue I see here is when we update the last_modified_date_time for an org, we need to keep track of it, so that next time when we need to update for the same org, it needs to be later than what was updated before
@petmongrels may be not an issue, we can just keep track of minutes, independent of org, next day when we update, we can add some minutes and update
@AchalaBelokar
set role <org_db_user>;
-- select * from report_card order by id;
AC: