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

how to handle venue name changes... #540

Open
alxndr opened this issue Sep 13, 2022 · 4 comments
Open

how to handle venue name changes... #540

alxndr opened this issue Sep 13, 2022 · 4 comments

Comments

@alxndr
Copy link
Owner

alxndr commented Sep 13, 2022

e.g. Blue Hills Bank Pav is now called Leader Bank Pav

@jjulian
Copy link

jjulian commented Sep 14, 2022

I like #289 to solve this - a good database schema would allow venue names to change, as the relationships would be via the venue id. sqlite is a good solution, as it can be committed to github and used during github pages generation.

@alxndr
Copy link
Owner Author

alxndr commented Sep 16, 2022

Thanks @jjulian! I am increasingly drawn to SQLite as an easy way to get some real DB features... but as I'm still learning my way around Gatsby, I'm nervous about configuring Gatsby to pull the data out of SQLite. (Also I'm a major version behind on Gatsby... 😞)

@jjulian
Copy link

jjulian commented Sep 17, 2022

I'm new to gatsby as well, but I do have experience modelling relational databases and querying with SQL. I found gatsby plugin gatsby-source-sqlite that may work well to use sqlite as a data source.
This would be a big change to your app though, as the following new technology would be introduced:

  • relational database (sqlite) - and the corresponding data model
  • SQL to fetch data from the db
  • GraphQL (it looks like gatsby uses graphql by default?)
    I also imagine it would change the way you "enter" show data, as you'd probably want a tool to add the data to sqlite rather than just editing the files as you do today.
    Big change. But could introduce a ton of flexibility to your app.

@alxndr
Copy link
Owner Author

alxndr commented Sep 21, 2022

The change in data entry will not be a big deal; the current data is already structured similarly to a relational database. Currently I use Google Sheets (with a custom view to check my work) and export to multiple CSV files; using SQLite will likely save time there.

GraphQL is one of the technologies here that's new to me. It's hooked up now, but the sources are those CSV files, and it isn't doing anything Real, just selecting all data per file, and then letting app code be responsible for filtering it.

My plan is to...

  • set up all the data in a SQLite file (in the spike/graphqlbranch)
  • refactor the Sets data into a table explicitly associating a position-in-set with a songperf & a set/show (e.g.?)
  • extract the data using the Gatsby system
  • refactor each route to use the data from GraphQL
  • spike: research options for validations / Uniqueness constraints

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