Skip to content

Getting Model/Table at the state of a revision #818

Answered by zzzeek
zikphil asked this question in Usage Questions
Discussion options

You must be logged in to vote

you can reflect tables within a migration, you can use op.get_bind() wtih any reflection-related operation:

my_table = Table('my_table', MetaData(), autoload_with=op.get_bind())

to have them in the form of "models" you'd need to use automap.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zikphil
Comment options

Answer selected by zikphil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants