Ps. SQLObject is does not alter an existing schema implicitly. Thus, if you have already created the table in the DB you need explicitly tell SQLObject to alter the schema. The following debug-out shows how its done:
from sqlobject import * sqlhub.processConnection = connectionForURI('sqlite:///:memory:?debug=1') class Adventurer(SQLObject):
... name = StringCol() ...
Adventurer.createTable()
1/Query : CREATE TABLE adventurer ( id INTEGER PRIMARY KEY, name TEXT ) 1/QueryR : CREATE TABLE adventurer ( id INTEGER PRIMARY KEY, name TEXT )
Adventurer.sqlmeta.addColumn(IntCol('level'), changeSchema=True)
2/Query : ALTER TABLE adventurer ADD COLUMN level INT 2/QueryR : ALTER TABLE adventurer ADD COLUMN level INT --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

