Question

I stating read Storm ORM docs, and try some examples with sqlite. I have one question, can Storm automaticaly create tables from models or no? I don't want to do this:

store.execute("CREATE TABLE person "
              "(id INTEGER PRIMARY KEY, name VARCHAR)")

every time when I want to create new table, also this is not good when table alredy exists.

Was it helpful?

Solution

Storm ORM haven't feature for autocreating tables. I start use peewee ORM it looks very nice.

OTHER TIPS

If you're still starting the project and haven't put too much work into it yet, let me kindly suggest, that you try an object oriented database directly, instead of emulating an object oriented database with some relational backend. ZODB is a very good match for that, but you should also have a look at MongoDB and colleaques. I had a try with Storm a while ago, and dropt it quite soon again, throwing a lot of code away, because of the horribly slow performance, especially with insert-or-update statements. You don't have to make the same mistake.

More on-topic: As far as I know, there is no such feature. I was also looking for it, and was somewhat disappointed, after setting up a detailed data model, that it couldn't generate the tables automatically. Beat me, if I missed it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top