• C
    Make 'migrate' clear the schema cache afterward · 16dadb12
    Chris Arcand 提交于
    Without clearing the caches afterward, removals done in migrations would
    not be reflected in a separate task in the same process. That is, given
    a table with a migration to remove a column, the schema cache would
    still reflect that a table has that in something such as the
    'db:seed' task:
    
    `rake db:migrate db:seed`
    (A common thing to do in a script for a project ala `bin/setup`)
    
    vs
    
    `rake db:migrate && rake db:seed`
    (Two processes)
    
    The first would not reflect that the column was removed.
    The second would (cache reset).
    16dadb12
database_tasks_test.rb 14.1 KB