aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2013-12-25 17:25:38 -0500
committerschneems <richard.schneeman@gmail.com>2013-12-25 18:03:55 -0500
commit707be603cfae39e82b63bbcf1fc64a2392edb693 (patch)
tree4631f02476645748f5ba1033dd9255f1739c567e /activerecord/test/cases
parentba882934bb66e240aef5e240272f3875ff86b8e7 (diff)
downloadrails-707be603cfae39e82b63bbcf1fc64a2392edb693.tar.gz
rails-707be603cfae39e82b63bbcf1fc64a2392edb693.tar.bz2
rails-707be603cfae39e82b63bbcf1fc64a2392edb693.zip
ensure environment is run before db:structure:load
Right now `db:drop` depends on `load_config` since so when `db:drop` gets executed `load_config` gets run. `db:structure:load` depends on `[:environment, :load_config]`. So before it runs, it executes `environment` but because `load_config` has already executed it is skipped. Note `db:load_config` is "invoke"-d twice, but only "execute"-d once: ``` ** Invoke db:drop (first_time) ** Invoke db:load_config (first_time) ** Execute db:load_config ** Execute db:drop ** Invoke db:structure:load (first_time) ** Invoke environment (first_time) ** Execute environment ** Invoke db:load_config ** Execute db:structure:load ``` The fix for this is making sure that the environment is run before any `load_config`: ``` ** Invoke environment (first_time) ** Execute environment ** Invoke db:drop (first_time) ** Invoke db:load_config (first_time) ** Execute db:load_config ** Execute db:drop ** Invoke db:structure:load (first_time) ** Invoke environment ** Invoke db:load_config ** Execute db:structure:load ```
Diffstat (limited to 'activerecord/test/cases')
0 files changed, 0 insertions, 0 deletions