right now metadata.create_all() will do it for you.

if you want to do just one table at a time, for now you can do:

if not engine.has_table(sometable.name):
        engine.create(sometable)

obviously a more convenient interface for table.exists() and  
table.create(checkexists=True) should be added.

On Jun 8, 2006, at 1:23 PM, Arnar Birgisson wrote:

> Hi there,
>
> What is the preferred way of creating a table (through Table.create()
> or alike) if it doesn't exist already, with a no-op if it does?
>
> Arnar
>
>
> _______________________________________________
> Sqlalchemy-users mailing list
> Sqlalchemy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users



_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to