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:
Rafael Mendonça França
2012-08-05 20:38:02 -03:00
parent a48ea6800e
commit 0fb6bbdf7e
2 changed files with 10 additions and 2 deletions

View File

@@ -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

View File

@@ -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