-
Notifications
You must be signed in to change notification settings - Fork 7
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
structure.sql is not updated after migrations are run #7
Comments
I see that you're using the rails console to execute
Would it be possible to change that into just executing
from the shell, as the rails docs proposes? |
@bostrom - Because different branches can have different migrations, in order to do it using the version you would need to find the latest common ancestor of the two branches, roll back before switching, and then go forward. It would still be slower because you would have to load your environment twice. The two hardest things are applying and rolling back the specific migrations that differ on each branch, and doing it quickly. If you can think of a solution that uses the rake task and doesn't take forever I'd be happy to take a look at it. |
Ah yes, I missed this part:
So yes, it seems that the rake migrate task is out of question. But how about just doing the same things as the dump task does after having run all migrations? |
@bostrom - I would be okay with it. |
@brysgo I had a look at this db dump thing today and added the dumping command after having done all migrations. It seems to work fine and doesn't load the environment again since it's run within the same However, with the Any ideas on possible solutions to this? I can make a pull-request with the changes I've made so you or anyone else can have a look. Ok? |
Thanks! If you make a pull request I'll take a look at it and see if I can think of anything. |
I just started using git-rails in our project and at first glance it's awesome, thanks!
However, it seems that it doesn't dump the database schema after running migrations. This is normally done by rails when running
rake db:migrate
, which updates db/schema.rb or db/structure.sql (depending on your dumping strategy).Is there a reason why the db schema isn't dumped like rake db:migrate does?
The text was updated successfully, but these errors were encountered: