Closed Bug 1100983 Opened 10 years ago Closed 10 years ago

Add last_modified column to the job table

Categories

(Tree Management :: Treeherder, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mdoglio, Assigned: mdoglio)

References

Details

Attachments

(2 files)

The last_modified column should be a timestamp defaulted to CURRENT_TIMESTAMP. The CURRENT_TIMESTAMP should also be used ON UPDATE.
This will require 3 migration steps on dev/stage/prod where: step 1 will update the schema defaulting the column to NULL and settings the ON UPDATE CURRENT_TIMESTAMP clause step 2 will set DEFAULT CURRENT_TIMESTAMP step 3 will set all the NULL values to GREATEST(submit_timestamp, start_timestamp, end_timestamp)
This change will enable the ui to perform requests of increments, reducing the load on both the service and the client
Assignee: nobody → mdoglio
Status: NEW → ASSIGNED
Attached file Github PR #290 on treeherder-service (deleted) —
Attachment #8524707 - Flags: review?(cdawson)
Blocks: 1101040
Attachment #8524707 - Flags: review?(cdawson) → review+
Attached file migration sql code (deleted) —
I'm going to use attachment 8524765 [details] to migrate dev/stage/prod
I realize we need some support form the dba to apply this change to production. If I do it by hand I think it will result in a huge table lock.
Only prod is missing.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Depends on: 1304096
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: