If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Investigate using a TIMESTAMP for our modified columns

RESOLVED WONTFIX

Status

addons.mozilla.org Graveyard
Code Quality
P4
enhancement
RESOLVED WONTFIX
8 years ago
2 years ago

People

(Reporter: clouserw, Unassigned)

Tracking

unspecified

Details

(Reporter)

Description

8 years ago
MySQL can auto-update a row's timestamp when the row is updated.  I expect this would be more reliable than Cake's updating.

CREATE TABLE `blah` (
`id` int(11) default NULL,
`asdf` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP)

mysql> select * from blah;
Empty set (0.00 sec)

mysql> INSERT INTO blah(`id`) VALUES (1);
Query OK, 1 row affected (0.01 sec)

mysql> INSERT INTO blah(`id`) VALUES (3);
Query OK, 1 row affected (0.00 sec)

mysql> select * from blah;
+------+---------------------+
| id   | asdf                |
+------+---------------------+
|    1 | 2009-12-10 10:04:30 | 
|    3 | 2009-12-10 10:04:36 | 
+------+---------------------+
2 rows in set (0.00 sec)

Updated

8 years ago
Component: Public Pages → Code Quality
QA Contact: web-ui → code-quality
(Reporter)

Comment 1

8 years ago
Django's DateTimeField(auto_now=True) uses a normal datetime field and handles the logic in the app.  Whateva'.  If it works, it works.  If we make tables outside of django for stats or whatever we can use timestamps then.  In the meantime, ->wontfix.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WONTFIX
(Assignee)

Updated

2 years ago
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.