-
Notifications
You must be signed in to change notification settings - Fork 196
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
Providing db:prepare
integration
#215
Comments
I'm also using this in a Edit: I've just realised, |
I have an idea... I think if we created a new prepare task, then override the default migrate task within it to run migrate with data, that might be a really light tough way of doing this. https://stackoverflow.com/a/8116584 I'll have a try later on. |
That idea didn't pan out, unfortunately - the built in prepare task doesn't actually invoke the other Rake tasks, it's all done in Ruby code: https://github.com/rails/rails/blob/main/activerecord/lib/active_record/tasks/database_tasks.rb#L176 |
I've opened a PR in #274 that adds this task - seems to work well for me, though I've only tested it with my own use case so far. |
any news about this? it's really needed |
Hi and thanks for this beautiful library.
In our company we rely on
db:prepare
task to maintain devs' databases state. This task basically migrates an existing database, or creates a database, migrates or loads its schema from a file and then seeds it if the database did not exist when the task was invoked.I couldn't find
db:prepare:with_data
, is there an equivalent task?The text was updated successfully, but these errors were encountered: