I will try to explain it better:
for example one of my tables looks like this
db.define_table("active_task",
SQLField('parameters', 'string'),
SQLField('add_date', 'datetime'),
SQLField('state', 'integer'))
What I'm trying to achieve is that every time someone inserts a row -
column add_date should point to actual time of insertion.
The easiest way for me is default value in database:
add_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
but i can't make such statement with SQLField class ?
i found there is something like
'notnull': 'NOT NULL DEFAULT %(default)s',
in sql.py
but I have no idea how to make use of it
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---