Skip to content
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

Alternate City Names #81

Open
drewroberts opened this issue Mar 19, 2021 · 1 comment
Open

Alternate City Names #81

drewroberts opened this issue Mar 19, 2021 · 1 comment

Comments

@drewroberts
Copy link
Member

I'm running into an issue with Cities (#18) where there will be a number of them with multiple spellings or variations and I don't want to have multiple entries in the database and splintered versions of the City. Here's an example:

  • St. Louis
  • Saint Louis
  • STL

We will already have East Saint Louis and unincorporated areas of the City in the database and I don't want multiple variations of the actual city name. By not allowing user input and forcing all Address input to run through Google Places Autocomplete (#30) we are eliminating some of this problem. I do need to find out the variation that Google Places uses for the City name and maybe still provide some alternates in a separate table similar to the approach with Alternate Email Addresses on the User model (TIPOFF/authorization#20).

@joshtorres
Copy link
Member

  • basically we want it to do a firstOrCreate([]) search for all versions and save the short_name if none are found
  • Keep a log and send a notification when we have to create a new city name so we know to double check (since we should have them all)
  • create a function to merge one city into the other one (moving over foreign keys, etc)
  • what would be really cool is if we create an issue to insert the city into the database migration and start a pull request (make the change if possible)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants