wrkout / exercises.json

Open Public Domain Exercise Dataset in JSON format
The Unlicense
318 stars 101 forks source link

Generate sqlite3 with migrations #138

Open kinow opened 3 years ago

kinow commented 3 years ago

WIP, just need to fix the INSERT command for sqlite. For a context on this change, my wife is a personal trainer, and I'm creating a small Vue3+FastAPI local app for her to run on her computer to automate part of the process to create new routines.

Trying to bootstrap the database with the code in this repo. Found a few typos, so planning to send a PR later :+1: least I can do to pay back for this great repo :+1:

Thanks! Bruno

kinow commented 3 years ago

Actually ended up going with sqlite + migrations... I think with a little more work this could be generic enough, so that others could pick a different driver (MySQL, Postgres, Oracle, etc), and just rely on Knex to do its job and create the queries.

Probably brings some problems for users who do not want to run migrations, and instead prefer to have the SQL script... but there may be a way to tell Knex to just create the SQL for the commands, perhaps?