From: Minh L. <mi...@to...> - 2004-03-04 03:02:39
|
How do I specify default value for a column? Following the example in the document, I have the following code but the generated SQL didn't have the default value see the debug output. Thanks ==== Code ===== class MyTable (SQLObject): name = StringCol(length=20, notNone=True, default='') age = IntCol(notNone=True, default=0) dummy = StringCol(length=20, notNone=True, default='DUMMY') === End code ==== === Debug output ===>> 1/Query : CREATE TABLE my_table ( id INT PRIMARY KEY AUTO_INCREMENT, age INT NOT NULL, name VARCHAR(20) NOT NULL, dummy VARCHAR(20) NOT NULL ) === End output ===== |