How do I create timestamp type columns in (mySQL) database?
I am working with situation where I would like to maintain timestamp (in UTC) of when a record is created or updated.
mySQL offers such facility if one declares column of type 'timestamp' with attributes - default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP'that tries to define field as timestamp, but it doesn't seem to work.
Is there way to declare column of type 'timestamp' in django and not datetime and assign some properties to the column.
As a hack I can always execute alter table command, but I am not sure what effect that will have if I want to use admin interface to edit those tables.
As a hack I can always execute alter table command, but I am not sure what effect that will have if I want to use admin interface to edit those tables.
Would appreciate any help/pointer on how one can go about handling UTC timestamp columns in database.
Thanks.
-SubodhYou received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home