Field <http://web2py.com/book/default/docstring/Field>('created_on',
'datetime', default=request
<http://web2py.com/book/default/docstring/request>.now),
    Field <http://web2py.com/book/default/docstring/Field>('created_by',
db.auth_user, default=auth.user_id),
    Field <http://web2py.com/book/default/docstring/Field>('updated_on',
'datetime', update=request
<http://web2py.com/book/default/docstring/request>.now),
    Field <http://web2py.com/book/default/docstring/Field>('updated_by',
db.auth_user, update=auth.user_id))


http://web2py.com/book/default/chapter/06#Table-Inheritance


<http://web2py.com/book/default/chapter/06#Table-Inheritance>
2010/12/26 David J. <[email protected]>

> How do  I specify Default DB values;
>
> ie: I have a db field created_at which is datetime and should be a
> timestamp of when the user was created.
>
> Normally in mysql; we use "created_at timestamp default now()"
> where do I specify this default value? Or do I specify it when I create the
> object?
>
>
> Thanks.
>
>


-- 

Bruno Rocha
http://about.me/rochacbruno/bio

Reply via email to