Hi,
Much less controversial question this time, I hope ;-)
I have:
class MyModel(Base)
...
I want to do:
engine = create_engine(...)
engine.execute(DropTable(MyModel.__table__))
engine.execute(CreateTable(MyModel.__table__))
...of course, this barfs the first time I run it as the table doesn't exist.
I was looking for something like:
engine.execute(DropTable(MyModel.__table__, if_exist=True))
what's the "right" way to do this?
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.