On 12/01/2015 02:49 PM, Chris Withers wrote:
> On Tue, Dec 1, 2015 at 8:17 AM, Chris Withers
> <<mailto:ch...@simplistix.co.uk>ch...@simplistix.co.uk> wrote:
>>
>>     I'm also looking for two events to listen to:
>>
>>     - once at 'database creation' time, so set up some stored
>>     procedures. (I know SQLAlchemy doesn't create databases itself, so
>>     interested in the correct approach for this)
>>
> So, thinking this through, how are non-table DDL elements added to a
> MetaData object such that create_all can find them?

any DDL() object is eventable with after_create, before_create, some
basic docs at:

http://docs.sqlalchemy.org/en/rel_1_0/core/ddl.html#custom-ddl


> 
> I'm guessing there's already a story for this as a result of Posgtres
> ENUM types, and that should work for other non-table DDL elements such
> as stored procedures, sequences, etc?
> 
> cheers,
> 
> Chris
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sqlalchemy+unsubscr...@googlegroups.com
> <mailto:sqlalchemy+unsubscr...@googlegroups.com>.
> To post to this group, send email to sqlalchemy@googlegroups.com
> <mailto:sqlalchemy@googlegroups.com>.
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

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

Reply via email to