Repairing migrations

magic_hat
Thu, 19 Jul 2007 20:07:45 -0000

So occassionally my migrations go...uh... off the rails. One of them
fails, and then I start getting errors about fields already existing,
etc. Or I make some changes to a database by hand, and then need to
bring the migration back in synch with the db without nuking the db
contents.

Sometimes I can turn the schema into a migration to accomplish this.
But other times the errors continue. Is there a better way to bring a
migration and existing db into synch?

Thanks!