[storm] How to check table exists?

Alexei Vinidiktov alexei.vinidiktov at gmail.com
Thu Aug 14 07:26:14 BST 2008


Hello,

How do I check when creating an instance of a class bound to a
database whether the 1. underlying database and 2. the tables already
exist (were created previously)?

IIRC, in SQLAlchemy when creating tables you can write something like this:

self.words.create(checkfirst=True)
self.meanings.create(checkfirst=True)
self.examples.create(checkfirst=True)

Which creates the tables only if they don't exist.

Storm doesn't have table generators so I wouldn't know what to do.

Thanks.

-- 
Alexei Vinidiktov



More information about the storm mailing list