avniproject / Adolescent-Sewa-Rural

0 stars 0 forks source link

Migrate individuals from wrong address to correct address. #7

Closed Gojo-Taqi closed 1 year ago

Gojo-Taqi commented 1 year ago

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:-

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:-