set role adsr;
select * from address_level al where title = 'Jaamboi'; -- 129206
select * from address_level al where title = 'Jamboi'; -- 408549
select count(*) from individual i where address_id = 129206; -- 40
select count(*) from individual i where address_id = 408549; -- 3
The address with id = 408549 is incorrect, and the one with id = 129206, is the correct one.
To-Do:-
[ ] Write a query to migrate all the individuals from the incorrect address to the right address.
[ ] Write a query to migrate all the program_enrolments from the incorrect address to the right address.
[ ] Write a query to migrate all the program_encounters from the incorrect address to the right address.
In adsr, there are 2 villages right now with different spellings and id's. They want only 1 village to be present now.
Link to the ticket :- https://avni.freshdesk.com/a/tickets/3054
Use the below query as reference:-
The address with id = 408549 is incorrect, and the one with id = 129206, is the correct one.
To-Do:-