On Wednesday, February 5, 2014 10:44:39 AM UTC-5, Michael Bayer wrote: > > > On Feb 5, 2014, at 9:43 AM, Jude Lucien <[email protected] <javascript:>> > wrote: > > I have a secondary problem now having changed my model to use declarative > base - as in db.create_all() does not create my tables in the database. > > How can I do this using the declarative base method? > > > Base.metadata is where you’d call create_all(my engine) from. > > @Jude: db.create_all() is part of the Flask-SQLAlchemy API, not SQLAlchemy proper. AFAIK it's ok to mix the two together (the project I'm working on certainly does) but if you're not subclassing db.Model in your models Flask-SQLAlchemy may not be doing you much good. Which is fine, just be aware.
-Matt -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/groups/opt_out.
