Dear all, http://www.sqlobject.org/SQLObject.html#runtime-column-and-join-changes claims that "SQLite does not support this feature". However for the simple case I have tried it works just as well on sqlite as postgres (see code below).
Also, http://www.sqlobject.org/News.html#id25 claims that "Implemented addColumn() for SQLite." This is all inconsistent. What's the true state of addColumn and delColumn on sqlite? Tom % cat changi.py from sqlobject import * import sys if len(sys.argv) > 1 and sys.argv[1] == 'sqlite': sqlhub.processConnection = connectionForURI('sqlite:/:memory:') else: sqlhub.processConnection = connectionForURI('postgres:///var/run/postgresql/changi') class Person(SQLObject): pass Person.createTable() Person() print list(Person.select()) Person.sqlmeta.addColumn(StringCol('name'), changeSchema=True) Person(name='Tom') print list(Person.select()) Person.sqlmeta.delColumn('name', changeSchema=True) Person() print list(Person.select()) % python changi.py sqlite [<Person 1 >] [<Person 1 name=None>, <Person 2 name='Tom'>] [<Person 1 >, <Person 2 >, <Person 3 >] % python changi.py [<Person 1L >] [<Person 1L name=None>, <Person 2L name='Tom'>] [<Person 1L >, <Person 2L >, <Person 3L >] ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss