This patch builds on the work of jbarnette (see [9122])
UTC timestamps are great as migration version numbers when developing with Git or Mercurial, but after a merge you're still left with the responsibility of figuring out which new migrations you're missing, and then running them manually.
This patch ensures that rake db:migrate automatically picks up the new ones for you. It also makes migrating down smarter, in the sense that it knows not to try and revert a migration it never applied.
It works by replacing the schema_info table with a schema_migrations table, that contains one row for each migration applied. The suggested approach is backwards-compatible with sites with a schema_info table, and existing migration files. Also, it does not change the format of schema.rb.
This approach works both in the case of DHH's preferred practice of running rake db:schema:load (if you do that, it doesn't migrate all over again), and in the case of folks that insist in migrating all the way every time.
It passes all existing tests for SQLite3 and MySQL. If there's interest from core, I can test further, including new tests and other databases.