exercises.json icon indicating copy to clipboard operation
exercises.json copied to clipboard

Generate sqlite3 with migrations

Open kinow opened this issue 4 years ago • 1 comments

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 avatar Jul 17 '21 10:07 kinow

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?

kinow avatar Jul 18 '21 05:07 kinow