Skip to content
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

ActiveRecord dump_schema_after_migration setting should apply to all migration rake tasks #20743

Closed
jturkel opened this issue Jun 30, 2015 · 4 comments
Assignees

Comments

@jturkel
Copy link
Contributor

jturkel commented Jun 30, 2015

The ActiveRecord::Base.dump_schema_after_migration configuration setting is great for running migrations without errors in environments like Heroku that don't have pg_dump installed. Unfortunately it only applies to the db:migrate rake task. It would be great if it also applied to the db:migrate:up, db:migrate:down, db:forward, and db:rollback rake tasks so those tasks could be run without errors in Heroku.

@senny
Copy link
Member

senny commented Jun 30, 2015

@jturkel I'll have a look.

@senny senny self-assigned this Jun 30, 2015
@senny
Copy link
Member

senny commented Jun 30, 2015

I can confirm this behavior on master. I'll submit a patch.

@jturkel
Copy link
Contributor Author

jturkel commented Jun 30, 2015

Thanks for the quick turnaround @senny !

@senny senny closed this as completed in 2183caa Jun 30, 2015
senny added a commit that referenced this issue Jun 30, 2015
…igrate

Closes #20743.

The task `db:_dump` now only dumps the schema if
`ActiveRecord::Base.dump_schema_after_migration` is true. This has
effects:

- `db:migrate:up`
- `db:migrate:down`
- `db:forward`
- `db:rollback`

Conflicts:
	activerecord/CHANGELOG.md
	railties/test/application/rake/migrations_test.rb
@senny
Copy link
Member

senny commented Jun 30, 2015

Fixed on master and backported to 4-2-stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants