title: How to fix database that has many tables without matching migrations with Rails
body: <p>I'm helping out with a friend's rails app. They have a database that contains many tables which were added manually using SQL rather than with rails migrations. They've started adding migrations normally, but they need to get the two back in sync.</p>
  
  <p>If we add the migrations now, they'll error because those tables/columns already exist. If we leave them out, people have to use db:schema:load to get up and running, and then run migrations one at a time by name to avoid errors. We'd like to avoid that and get back to a healthy state instead.</p>
  
  <p>Does anyone know of a better way to get the migrations back in step with the database? We have to do this without losing any data.</p>