Page MenuHomePhabricator

Remove invalid City data from DB
Closed, ResolvedPublic1 Estimated Story Points

Description

Some 20k records have one 'City/Town', as their city. Some are preventing merges

Other strings to strip:
'0', 'City/Town', 'NoCity', 'City'

Note I thought this would find them

select * FROM civicrm_address WHERE city = 0 LIMIT 2\G

but that returns ones with St. Petersberg as a city! Don't do that!

select city, count(*) FROM civicrm.civicrm_address WHERE city IN('0', 'city', 'nocity', 'city/town') GROUP BY city LIMIT 20000;
+-----------+----------+

citycount(*)

+-----------+----------+

035
City119
City/Town19336
NOCITY552

+-----------+----------+

Event Timeline

Change 375948 had a related patch set uploaded (by Eileen; owner: Eileen):
[wikimedia/fundraising/crm@master] Remove void data from city field.

https://gerrit.wikimedia.org/r/375948

Change 375948 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Remove void data from city field.

https://gerrit.wikimedia.org/r/375948