Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upUsing diesel_cli for development only and running migrations from the binary #1840
Comments
This comment has been minimized.
|
You are basically describing the current state |
weiznich
closed this
Sep 10, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
kpcyrd commentedSep 10, 2018
I'm not sure if this has been requested before, but I couldn't find anything in the issue tracker or the docs. If there's something, please point me to it.
My usecase is somewhat straightforward. I'm writing a small application that uses sqlite and I would like to use diesel to abstract the database layer (the examples in the guides look really good!).
What makes my usecase special: It seems diesel is supposed to be used together with diesel_cli in a way that an administrator runs migrations on the database before upgrading to a new version. This is a very sensible choice for deployments with multiple deployments that talk to a central database.
My usecase is much simpler in the way that only a local sqlite is used. This means that I don't want to ask the user to run database migrations manually, instead I want to have this part in my binary so I can trigger both the database initialization and execute migrations if needed.
Ideally, diesel_cli would only be used by developers in my usecase, while the user doesn't need to know what diesel is or how to run database migrations. :)
Please let me know what you think!