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

feat: simple Location model #35

Merged
merged 4 commits into from
Nov 20, 2023
Merged

feat: simple Location model #35

merged 4 commits into from
Nov 20, 2023

Conversation

raphodn
Copy link
Member

@raphodn raphodn commented Nov 16, 2023

What

  • new Location model & schema
  • it's goal is to store metadata fetched from OpenStreetMap, and link it to the Prices (next PRs)

@raphodn raphodn self-assigned this Nov 16, 2023
@raphodn raphodn requested a review from raphael0202 November 16, 2023 15:12
@raphodn raphodn linked an issue Nov 16, 2023 that may be closed by this pull request
4 tasks
@raphodn raphodn force-pushed the raphodn/location-model branch from 0a2cb4b to 9752066 Compare November 16, 2023 15:23
class Location(Base):
id = Column(Integer, primary_key=True, index=True)

osm_id = Column(BigInteger)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't we use osm_id as a primary key directly, as it's an INT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not rely 100% on OSM. There's probably future locations that will not/never be in OSM. Like online stores, or temporary markets, or even closed locations 🤔...

app/models.py Outdated Show resolved Hide resolved
@raphodn raphodn merged commit 32562ad into main Nov 20, 2023
3 checks passed
@raphodn raphodn deleted the raphodn/location-model branch November 20, 2023 23:52
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

Successfully merging this pull request may close these issues.

Create a Location model
2 participants