I work in a team of people collaborating on database development and we'd 
like to start version controlling and deploy our changes with Alembic. 

I was wondering though if there is a way to generate the DDL for the 
current state of the whole schema as of a given revision... something like 
the 'offline' SQL generation, however rather than every intermediate 
revision, just output the CREATE statements of the final states of all the 
objects.

You might ask why anyone would want to do this... the reason is that we 
generally like to do code reviews or pull requests when someone deploys a 
change. If the only artifacts stored in source control are alembic 
migrations, it can be difficult for a reviewer to get an idea of the 
overall context and impact of a given migration or set of migrations.

If we could use alembic to update a file or set of files representing the 
current state of the entire DB, then that could be checked into version 
control along with the migrations. Granted it would be useless for 
migrating a given instance of a database from one state to another, but it 
would be a useful and more readable way for a dev to understand all the 
objects in a database, short of logging into a live instance of one and 
poking around.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy-alembic+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to