On Aug 21, 2012, at 12:50 PM, andrea crotti wrote: > 2012/8/21 Simon King <si...@simonking.org.uk>: >> >> The MetaData instance is available via the declarative base class, so >> you should be able to do something like: >> >> Base.metadata.create_all() >> >> http://docs.sqlalchemy.org/en/rel_0_7/orm/extensions/declarative.html#accessing-the-metadata >> >> Hope that helps, >> >> Simon >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sqlalchemy" group. >> To post to this group, send email to sqlalchemy@googlegroups.com. >> To unsubscribe from this group, send email to >> sqlalchemy+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/sqlalchemy?hl=en. >> > > > Very good thanks, I also had to bind it first to my engine but then it > worked perfectly: > meta = Base.metadata > meta.bind = eng
Base.metadata.create_all(eng) will get you there more succinctly and without a messy fixed association set up. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.