Change a way ActiveRecord's config is prepared for rake tasks
Change a way ActiveRecord's config is prepared for rake tasks

In commit d1d7c86d0 I moved setting migrations paths into activerecord's
railtie to remove Rails dependency on databases.rake. However, it
introduced a regression, ENGINE_PATH was not available at the moment, so
engine's migrations where not added properly to paths. Fix was added
at 97a4a771, but it changes a way things work from using ENGINE_PATH to
APP_RAKEFILE. Additionally, the config runs when the code loads, while
previously it ran in the db:load_config rake task

In order to make it more in pair with original version this commit
changes the config to run only on load_config task. This code uses the
fact that defining a task in rake does not overwrite, but only appends.

It also allows to get back to checking for ENGINE_PATH

arjes/rails,baerjam/rails,gauravtiwari/rails,utilum/rails,voray/rails,Stellenticket/rails,yhirano55/rails,elfassy/rails,mijoharas/rails,assain/rails,Vasfed/rails,yahonda/rails,yahonda/rails,elfassy/rails,bolek/rails,pvalena/rails,kmcphillips/rails,arunagw/rails,illacceptanything/illacceptanything,bogdanvlviv/rails,jeremy/rails,esparta/rails,bradleypriest/rails,untidy-hair/rails,eileencodes/rails,yasslab/railsguides.jp,eileencodes/rails,kddeisz/rails,flanger001/rails,kmayer/rails,mechanicles/rails,ttanimichi/rails,bolek/rails,matrinox/rails,kmayer/rails,Stellenticket/rails,gfvcastro/rails,Envek/rails,marklocklear/rails,illacceptanything/illacceptanything,gcourtemanche/rails,mohitnatoo/rails,utilum/rails,betesh/rails,joonyou/rails,Erol/rails,coreyward/rails,betesh/rails,stefanmb/rails,yhirano55/rails,kaspth/rails,yawboakye/rails,ngpestelos/rails,mtsmfm/railstest,utilum/rails,assain/rails,utilum/rails,gfvcastro/rails,schuetzm/rails,ledestin/rails,notapatch/rails,gavingmiller/rails,mathieujobin/reduced-rails-for-travis,notapatch/rails,mechanicles/rails,rossta/rails,rails/rails,esparta/rails,Sen-Zhang/rails,starknx/rails,xlymian/rails,alecspopa/rails,assain/rails,kaspth/rails,arunagw/rails,samphilipd/rails,pvalena/rails,voray/rails,MichaelSp/rails,maicher/rails,Spin42/rails,riseshia/railsguides.kr,arunagw/rails,yalab/rails,marklocklear/rails,koic/rails,alecspopa/rails,odedniv/rails,illacceptanything/illacceptanything,amoody2108/TechForJustice,flanger001/rails,mechanicles/rails,shioyama/rails,palkan/rails,palkan/rails,mijoharas/rails,betesh/rails,prathamesh-sonpatki/rails,pschambacher/rails,matrinox/rails,kenta-s/rails,Envek/rails,travisofthenorth/rails,rossta/rails,matrinox/rails,rbhitchcock/rails,kenta-s/rails,illacceptanything/illacceptanything,ngpestelos/rails,yawboakye/rails,printercu/rails,Edouard-chin/rails,deraru/rails,untidy-hair/rails,kamipo/rails,schuetzm/rails,mohitnatoo/rails,kamipo/rails,tgxworld/rails,koic/rails,Edouard-chin/rails,sergey-alekseev/rails,tjschuck/rails,illacceptanything/illacceptanything,samphilipd/rails,illacceptanything/illacceptanything,BlakeWilliams/rails,yahonda/rails,iainbeeston/rails,arjes/rails,Vasfed/rails,eileencodes/rails,Stellenticket/rails,Vasfed/rails,vassilevsky/rails,iainbeeston/rails,rails/rails,schuetzm/rails,flanger001/rails,stefanmb/rails,riseshia/railsguides.kr,deraru/rails,georgeclaghorn/rails,illacceptanything/illacceptanything,sealocal/rails,EmmaB/rails-1,iainbeeston/rails,illacceptanything/illacceptanything,kirs/rails-1,xlymian/rails,jeremy/rails,MSP-Greg/rails,lcreid/rails,kmcphillips/rails,BlakeWilliams/rails,illacceptanything/illacceptanything,mtsmfm/rails,iainbeeston/rails,kirs/rails-1,samphilipd/rails,elfassy/rails,hanystudy/rails,mathieujobin/reduced-rails-for-travis,vassilevsky/rails,printercu/rails,tgxworld/rails,BlakeWilliams/rails,kddeisz/rails,tgxworld/rails,lcreid/rails,MichaelSp/rails,kddeisz/rails,bradleypriest/rails,stefanmb/rails,tjschuck/rails,pschambacher/rails,Envek/rails,kddeisz/rails,fabianoleittes/rails,Spin42/rails,joonyou/rails,Sen-Zhang/rails,lcreid/rails,fabianoleittes/rails,vassilevsky/rails,mtsmfm/railstest,88rabbit/newRails,printercu/rails,prathamesh-sonpatki/rails,kachick/rails,joonyou/rails,tijwelch/rails,yasslab/railsguides.jp,vipulnsward/rails,Vasfed/rails,brchristian/rails,marklocklear/rails,hanystudy/rails,travisofthenorth/rails,jeremy/rails,Sen-Zhang/rails,BlakeWilliams/rails,88rabbit/newRails,yawboakye/rails,mathieujobin/reduced-rails-for-travis,rafaelfranca/omg-rails,shioyama/rails,joonyou/rails,rails/rails,tijwelch/rails,arunagw/rails,yalab/rails,lcreid/rails,arjes/rails,baerjam/rails,brchristian/rails,untidy-hair/rails,starknx/rails,riseshia/railsguides.kr,repinel/rails,kachick/rails,yasslab/railsguides.jp,yalab/rails,richseviora/rails,georgeclaghorn/rails,pvalena/rails,untidy-hair/rails,deraru/rails,tijwelch/rails,illacceptanything/illacceptanything,yahonda/rails,georgeclaghorn/rails,travisofthenorth/rails,vipulnsward/rails,coreyward/rails,amoody2108/TechForJustice,palkan/rails,pschambacher/rails,lucasmazza/rails,lucasmazza/rails,vipulnsward/rails,mtsmfm/railstest,deraru/rails,MSP-Greg/rails,coreyward/rails,bogdanvlviv/rails,richseviora/rails,rossta/rails,Edouard-chin/rails,Edouard-chin/rails,repinel/rails,yhirano55/rails,maicher/rails,assain/rails,odedniv/rails,yalab/rails,georgeclaghorn/rails,odedniv/rails,shioyama/rails,rafaelfranca/omg-rails,kachick/rails,ttanimichi/rails,travisofthenorth/rails,koic/rails,felipecvo/rails,illacceptanything/illacceptanything,starknx/rails,gcourtemanche/rails,ngpestelos/rails,voray/rails,sealocal/rails,mechanicles/rails,repinel/rails,vipulnsward/rails,rails/rails,bogdanvlviv/rails,flanger001/rails,hanystudy/rails,bolek/rails,notapatch/rails,mtsmfm/rails,rafaelfranca/omg-rails,Erol/rails,esparta/rails,illacceptanything/illacceptanything,baerjam/rails,MSP-Greg/rails,aditya-kapoor/rails,aditya-kapoor/rails,MSP-Greg/rails,bogdanvlviv/rails,MichaelSp/rails,aditya-kapoor/rails,gauravtiwari/rails,ledestin/rails,baerjam/rails,xlymian/rails,tgxworld/rails,shioyama/rails,repinel/rails,mohitnatoo/rails,sealocal/rails,Stellenticket/rails,esparta/rails,fabianoleittes/rails,felipecvo/rails,felipecvo/rails,ledestin/rails,riseshia/railsguides.kr,betesh/rails,Erol/rails,88rabbit/newRails,printercu/rails,rbhitchcock/rails,yhirano55/rails,yawboakye/rails,prathamesh-sonpatki/rails,schuetzm/rails,jeremy/rails,notapatch/rails,EmmaB/rails-1,richseviora/rails,tjschuck/rails,alecspopa/rails,maicher/rails,pvalena/rails,tjschuck/rails,Spin42/rails,gauravtiwari/rails,yasslab/railsguides.jp,sergey-alekseev/rails,EmmaB/rails-1,gavingmiller/rails,gfvcastro/rails,Erol/rails,kirs/rails-1,gavingmiller/rails,illacceptanything/illacceptanything,illacceptanything/illacceptanything,prathamesh-sonpatki/rails,ttanimichi/rails,brchristian/rails,palkan/rails,kmcphillips/rails,eileencodes/rails,kaspth/rails,mijoharas/rails,kenta-s/rails,mohitnatoo/rails,gfvcastro/rails,Envek/rails,lucasmazza/rails,illacceptanything/illacceptanything,fabianoleittes/rails,aditya-kapoor/rails,mtsmfm/rails,gcourtemanche/rails,bradleypriest/rails,rbhitchcock/rails,kamipo/rails,kmayer/rails,sergey-alekseev/rails,kmcphillips/rails,amoody2108/TechForJustice