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

Check for duplicate short codes #180

Open
2 tasks
vnugent opened this issue Nov 4, 2022 · 1 comment
Open
2 tasks

Check for duplicate short codes #180

vnugent opened this issue Nov 4, 2022 · 1 comment
Labels
complexity - Medium help wanted Extra attention is needed
Milestone

Comments

@vnugent
Copy link
Contributor

vnugent commented Nov 4, 2022

We should enforce "airport-code" shortCode uniqueness within a country.

For example, there should only 1 CRACKS in the US.

Implementation ideas:

  • add a new country code field to metadata. See addCountry()
  • create a compound index with metadata.shortCode + metadata.countryCode

Screen Shot 2022-11-03 at 8 00 23 PM

@vnugent vnugent added help wanted Extra attention is needed complexity - Medium and removed complexity - Medium labels Nov 4, 2022
@vnugent vnugent added this to the v0.7 milestone Dec 11, 2022
@CocoisBuggy
Copy link
Contributor

I can work on this, but I have an architectural query:

Do shortcodes need to be globally unique, or do they need to be unique per root area \ parent area.

I can enforce the database rule easily enough, but would like to be sure I know how this system is meant to work 🤗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity - Medium help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants