I've been getting up to speed with SQLAlchemy and alembic and having a great time of it. This is some great stuff!
One thing that's been confounding me is this: My Alembic schema revisions are 'authoritative' for my metadata (i.e. I've started from scratch using alembic to build the schema from nothing), yet it doesn't appear that the metadata that exists in my alembic scripts can be leveraged by my models in my main app. So far, I've been maintaining effectively two versions of the metadata, one in the form of the "flattened projection" of my alembic schema rev scripts, and another in my application models scripts. I understand that there are some facilities to auto-re-generate the metadata from the RDBMS on the application side, but that seems potentially "lossy", or at least subject to the whims of whatever DBAPI provider I'm using. Is there a way to pull this flattened projection of metadata out of alembic and into my app's models at runtime? (i.e. import alembic, read the version from the live DB, then build the metadata by playing the upgrade scripts forward, not against the database, but against a metadata instance?) It seems like a fool's errand to try to keep my app models in sync with the flattened projection of the schema revisions by hand. My assumption is that I'm missing something super-obvious here. Thanks, Ian -- 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.