mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
707be603cf
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 ``` |
||
---|---|---|
.. | ||
initializers | ||
middleware | ||
rack | ||
rake | ||
asset_debugging_test.rb | ||
assets_test.rb | ||
build_original_fullpath_test.rb | ||
configuration_test.rb | ||
console_test.rb | ||
generators_test.rb | ||
loading_test.rb | ||
mailer_previews_test.rb | ||
middleware_test.rb | ||
multiple_applications_test.rb | ||
paths_test.rb | ||
rackup_test.rb | ||
rake_test.rb | ||
rendering_test.rb | ||
routing_test.rb | ||
runner_test.rb | ||
test_runner_test.rb | ||
test_test.rb | ||
url_generation_test.rb |