Skip to content

Autogen-Import for Values other than Schema Constructs Dynamically #1136

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

You must be logged in to vote

that documentation example you point to refers to the type objects you'd have inside of the Column, like an Integer or String. The render_item() hook is only set up for types, columns and constraints right now, not for a CreateTable nor would it be called for individual dialect items inside of the Table's kwargs.

The elements that are inside the Table's "kw" collection are just rendered through repr() right now so you wouldn't get any access to the table or anything like that at this level.

to get a top level view of the whole autogenerate, where you can search for things like CreateTableOp and then add imports to the migration context would be the process_revision_directives hook. Docs f…

Replies: 1 comment 1 reply

Comment options

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

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