what db engine? varchar should be the default. You can use Field('modified_on''datetime',update=request.now,writable=False) to timestamp on update.
On Jan 8, 2:54 pm, Martin H <helpmh...@gmail.com> wrote: > Hi, > > I've defined my table with certain restrictions and default values. For > example set some fields as required, and some have default values. > > When I look at the table schema that it created, the default values and > restrictions aren't set at the database level. Is there a way to do this > with web2py? I will likely need to insert/update fields in the database > without web2py on occasion and would like the restrictions and defaults in > place. Can I just set migrate to False and manually alter the tables to have > them? > > Also, is there are way for it to use varchar instead of char? > > Lastly, is there a way to auto-update a field with request.now? I am looking > to have a modified field which updates whenever a row/record is updated. In > django, this as a simple setting in the field definition. > > Thanks.