rails db:migrate vs rake db:migrate -
i'm new rails. noticed when generating data migration in rails 5, people use rails db:migrate
on rake db:migrate
. can explain difference between rails vs rake command in database migration? mean rake command obsolete in rails 5?
many thanks
rails core team decided have consistency enabling rails command support rake does.
for example in rails 5 commands db:migrate, setup, test etc part of rake command in rails 4 being supported rails command. can still choose use rake run commands similar how run in rails 4. because rails community has introduced rake proxy instead of moving command options rake rails.
what happens internally when rails db:migrate command executed, rails checks if db:migrate rails natively supports or not. in case db:migrate not natively supported rails, rails delegates execution rake via rake proxy.
if want see commands supported rails in rails 5 can long list of options executing rails --help.
Comments
Post a Comment