autogen from persisted metadata
see if we can add a feature whereby you push out the current metadata to a file, like a pickle of the metadata or JSON (or whatever). then autogenerate wouldn't need to use reflection and we could get very accurate upgrades/downgrades. this would solve all of the issues we have with server defaults, types, etc.
so existing migration:
takes the current MetaData and dumps to a file.
then in autogenerate, instead of reflecting, we just look for that file and pull from there.
perhaps the persisted file can itself be constructed of individual migrations. this is of course not too different from just the other way this could go, by using the migration files and op.* directives themselves to determine current state.
Or the autogenerate diffs themselves.
but what happens if the user creates some migrations without using autogenerate? still would want to always write out the current metadata state to the file.
its almost like the persisted file is another database schema that we keep up to date exactly as we do the real database. basically something that can be "reflected" completely accurately.
it means the file would be written when a migration actually happens, rather than when revision --autogenerate is called.
more thought to come....