On Saturday 28 August 2010 7:33:16 am mdipierro wrote:
> I think I have fixed this in trunk:
>
> db.define_table('z',Field('b',default=Expression('CURRENT_DATE',db=db),notn
>ull=True))
>
> now works for me.
>

Pulled the code from trunk and it works here also:

db.define_table('default_test',
Field('date_default','date',default=Expression('CURRENT_DATE',db=db),notnull=True),
Field('txt_fld','text'))

sqlite> .schema default_test
CREATE TABLE default_test(
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    date_default DATE NOT NULL DEFAULT CURRENT_DATE,
    txt_fld TEXT
);
sqlite> insert into default_test(id) values(1);
sqlite> select * from default_test;
1|2010-08-28|

Thanks very much for this,

-- 
Adrian Klaver
[email protected]

Reply via email to