mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Merge pull request #7140 from seamusabshere/patch-1
Make sure :environment task is executed before db:schema:load or db:structure:load Conflicts: activerecord/CHANGELOG.md
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
## Rails 3.2.9 (unreleased)
|
||||
|
||||
* Make sure `:environment` task is executed before `db:schema:load` or `db:structure:load`
|
||||
Fixes #4772.
|
||||
|
||||
*Seamus Abshere*
|
||||
|
||||
|
||||
## Rails 3.2.8 ##
|
||||
|
||||
* Do not consider the numeric attribute as changed if the old value is zero and the new value
|
||||
|
||||
@@ -369,7 +369,7 @@ db_namespace = namespace :db do
|
||||
end
|
||||
end
|
||||
|
||||
task :load_if_ruby => 'db:create' do
|
||||
task :load_if_ruby => [:environment, 'db:create'] do
|
||||
db_namespace["schema:load"].invoke if ActiveRecord::Base.schema_format == :ruby
|
||||
end
|
||||
end
|
||||
@@ -445,7 +445,7 @@ db_namespace = namespace :db do
|
||||
end
|
||||
end
|
||||
|
||||
task :load_if_sql => 'db:create' do
|
||||
task :load_if_sql => [:environment, 'db:create'] do
|
||||
db_namespace["structure:load"].invoke if ActiveRecord::Base.schema_format == :sql
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user