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

Add ActiveRecord::Tasks::DatabaseTasks.migrate #16350

Merged
merged 1 commit into from Jul 31, 2014

Conversation

JackDanger
Copy link
Contributor

This extracts the logic that was embedded in a Rake task into a static method.
Bonus: the first test for rake db:migrate

@@ -784,6 +784,15 @@ def mtime
end
end

module MigrateTask#:nodoc:
def self.perform(target_version, verbose, scope)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's avoid the indirection of having this moduke implementing this logic on the migrate method of the database task.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I folded it into DatabaseTasks.migrate and you're right that it's way better all in one place. Thanks!

This extracts the logic that was embedded in a Rake task into a static
method.
Bonus: the first test for `rake db:migrate`
rafaelfranca added a commit that referenced this pull request Jul 31, 2014
Add ActiveRecord::Tasks::DatabaseTasks.migrate
@rafaelfranca rafaelfranca merged commit 71fac05 into rails:master Jul 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants