Closed
Bug 1181743
Opened 9 years ago
Closed 9 years ago
Give the stage/prod job_log_url.parse_timestamp column a default value
Categories
(Tree Management :: Treeherder: Infrastructure, defect, P1)
Tree Management
Treeherder: Infrastructure
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
References
Details
Bug 1178389 removed job_log_url.parse_timestamp.
The problem is that until we drop the column, the changes in bug 1178389 mean that the stored queries that add/update rows in job_log_url are not specifying a value for parse_timestamp - and that column has no default, and a NOT NULL specified.
This results in:
_mysql_exceptions:OperationalError: (1364, "Field 'parse_timestamp' doesn't have a default value")
For DBs that have the old column.
As such, we need to set a default value for now, then deploy bug 1178389, then we can drop the column.
This should work:
manage.py run_sql -s "ALTER
TABLE 'job_log_url' CHANGE 'parse_timestamp' 'parse_timestamp' int(10) NOT NULL DEFAULT '0';"
Assignee | ||
Comment 1•9 years ago
|
||
Stage:
[emorley@treeherder-rabbitmq1.stage.private.scl3 ~]$ cd /data/www/treeherder.allizom.org/treeherder-service/
[emorley@treeherder-rabbitmq1.stage.private.scl3 treeherder-service]$ time ../venv/bin/python ./manage.py run_sql -s "A LTER TABLE job_log_url CHANGE parse_timestamp parse_timestamp int(10) NOT NULL DEFAULT 0;"
SQL command: ALTER TABLE job_log_url CHANGE parse_timestamp parse_timestamp int(10) NOT NULL DEFAULT 0;
67 datasource found
--------------------------
Sql code executed on addon-sdk - jobs:
--------------------------
Sql code executed on alder - jobs:
--------------------------
Sql code executed on ash - jobs:
--------------------------
Sql code executed on b2g-inbound - jobs:
--------------------------
Sql code executed on birch - jobs:
--------------------------
Sql code executed on build-system - jobs:
--------------------------
Sql code executed on cedar - jobs:
--------------------------
Sql code executed on comm-aurora - jobs:
--------------------------
Sql code executed on comm-beta - jobs:
--------------------------
Sql code executed on comm-central - jobs:
--------------------------
Sql code executed on comm-esr24 - jobs:
--------------------------
Sql code executed on comm-esr31 - jobs:
--------------------------
Sql code executed on cypress - jobs:
--------------------------
Sql code executed on date - jobs:
--------------------------
Sql code executed on elm - jobs:
--------------------------
Sql code executed on fig - jobs:
--------------------------
Sql code executed on fx-team - jobs:
--------------------------
Sql code executed on gaia - jobs:
--------------------------
Sql code executed on gaia-master - jobs:
--------------------------
Sql code executed on gaia-try - jobs:
--------------------------
Sql code executed on gaia-v1_4 - jobs:
--------------------------
Sql code executed on graphics - jobs:
--------------------------
Sql code executed on gum - jobs:
--------------------------
Sql code executed on holly - jobs:
--------------------------
Sql code executed on jamun - jobs:
--------------------------
Sql code executed on larch - jobs:
--------------------------
Sql code executed on maple - jobs:
--------------------------
Sql code executed on mozilla-aurora - jobs:
--------------------------
Sql code executed on mozilla-b2g18 - jobs:
--------------------------
Sql code executed on mozilla-b2g18_v1_1_0_hd - jobs:
--------------------------
Sql code executed on mozilla-b2g26_v1_2 - jobs:
--------------------------
Sql code executed on mozilla-b2g28_v1_3 - jobs:
--------------------------
Sql code executed on mozilla-b2g28_v1_3t - jobs:
--------------------------
Sql code executed on mozilla-b2g30_v1_4 - jobs:
--------------------------
Sql code executed on mozilla-b2g32_v2_0 - jobs:
--------------------------
Sql code executed on mozilla-b2g34_v2_1 - jobs:
--------------------------
Sql code executed on mozilla-beta - jobs:
--------------------------
Sql code executed on mozilla-central - jobs:
--------------------------
Sql code executed on mozilla-esr17 - jobs:
--------------------------
Sql code executed on mozilla-esr24 - jobs:
--------------------------
Sql code executed on mozilla-esr31 - jobs:
--------------------------
Sql code executed on mozilla-inbound - jobs:
--------------------------
Sql code executed on mozilla-release - jobs:
--------------------------
Sql code executed on oak - jobs:
--------------------------
Sql code executed on pine - jobs:
--------------------------
Sql code executed on qa-try - jobs:
--------------------------
Sql code executed on services-central - jobs:
--------------------------
Sql code executed on staging-gaia-try - jobs:
--------------------------
Sql code executed on taskcluster-integration - jobs:
--------------------------
Sql code executed on try - jobs:
--------------------------
Sql code executed on try-comm-central - jobs:
--------------------------
Sql code executed on try-taskcluster - jobs:
--------------------------
Sql code executed on unknown - jobs:
--------------------------
Sql code executed on ux - jobs:
--------------------------
Sql code executed on mozilla-b2g34_v2_1s - jobs:
--------------------------
Sql code executed on mozilla-b2g37_v2_2 - jobs:
--------------------------
Sql code executed on bugzilla - jobs:
--------------------------
Sql code executed on bmo - jobs:
--------------------------
Sql code executed on mozilla-esr38 - jobs:
--------------------------
Sql code executed on comm-esr38 - jobs:
--------------------------
Sql code executed on bugzilla-master - jobs:
--------------------------
Sql code executed on bmo-master - jobs:
--------------------------
Sql code executed on bugzilla-5_0 - jobs:
--------------------------
Sql code executed on bugzilla-4_4 - jobs:
--------------------------
Sql code executed on bugzilla-4_2 - jobs:
--------------------------
Sql code executed on bmo-development - jobs:
--------------------------
!!! Sql code execution failed on mozilla-b2g37_v2_2r - jobs !!!
(1054, "Unknown column 'parse_timestamp' in 'job_log_url'")
real 0m3.223s
user 0m0.998s
sys 0m0.171s
Assignee | ||
Comment 2•9 years ago
|
||
(mozilla-b2g37_v2_2r was just new, which is why it didn't have the existing column, which is fine)
Prod:
[emorley@treeherder-rabbitmq1.private.scl3 ~]$ cd /data/www/treeherder.mozilla.org/treeherder-service/
[emorley@treeherder-rabbitmq1.private.scl3 treeherder-service]$ time ../venv/bin/python ./manage.py run_sql -s "ALTER T ABLE job_log_url CHANGE parse_timestamp parse_timestamp int(10) NOT NULL DEFAULT 0;"
SQL command: ALTER TABLE job_log_url CHANGE parse_timestamp parse_timestamp int(10) NOT NULL DEFAULT 0;
72 datasource found
--------------------------
Sql code executed on accessibility - jobs:
--------------------------
Sql code executed on addon-sdk - jobs:
--------------------------
Sql code executed on alder - jobs:
--------------------------
Sql code executed on ash - jobs:
--------------------------
Sql code executed on b2g-inbound - jobs:
--------------------------
Sql code executed on birch - jobs:
--------------------------
Sql code executed on build-system - jobs:
--------------------------
Sql code executed on cedar - jobs:
--------------------------
Sql code executed on cypress - jobs:
--------------------------
Sql code executed on date - jobs:
--------------------------
Sql code executed on elm - jobs:
--------------------------
Sql code executed on fig - jobs:
--------------------------
Sql code executed on fx-team - jobs:
--------------------------
Sql code executed on gaia - jobs:
--------------------------
Sql code executed on gaia-master - jobs:
--------------------------
Sql code executed on gaia-try - jobs:
--------------------------
Sql code executed on gaia-v1_4 - jobs:
--------------------------
Sql code executed on graphics - jobs:
--------------------------
Sql code executed on gum - jobs:
--------------------------
Sql code executed on holly - jobs:
--------------------------
Sql code executed on jamun - jobs:
--------------------------
Sql code executed on larch - jobs:
--------------------------
Sql code executed on maple - jobs:
--------------------------
Sql code executed on mozilla-aurora - jobs:
--------------------------
Sql code executed on mozilla-b2g18 - jobs:
--------------------------
Sql code executed on mozilla-b2g18_v1_1_0_hd - jobs:
--------------------------
Sql code executed on mozilla-b2g26_v1_2 - jobs:
--------------------------
Sql code executed on mozilla-b2g28_v1_3 - jobs:
--------------------------
Sql code executed on mozilla-b2g30_v1_4 - jobs:
--------------------------
Sql code executed on mozilla-beta - jobs:
--------------------------
Sql code executed on mozilla-central - jobs:
--------------------------
Sql code executed on mozilla-esr17 - jobs:
--------------------------
Sql code executed on mozilla-esr24 - jobs:
--------------------------
Sql code executed on mozilla-inbound - jobs:
--------------------------
Sql code executed on mozilla-release - jobs:
--------------------------
Sql code executed on oak - jobs:
--------------------------
Sql code executed on pine - jobs:
--------------------------
Sql code executed on qa-try - jobs:
--------------------------
Sql code executed on services-central - jobs:
--------------------------
Sql code executed on taskcluster-integration - jobs:
--------------------------
Sql code executed on thunderbird-aurora - jobs:
--------------------------
Sql code executed on thunderbird-beta - jobs:
--------------------------
Sql code executed on thunderbird-esr24 - jobs:
--------------------------
Sql code executed on thunderbird-trunk - jobs:
--------------------------
Sql code executed on thunderbird-try - jobs:
--------------------------
Sql code executed on try - jobs:
--------------------------
Sql code executed on try-taskcluster - jobs:
--------------------------
Sql code executed on unknown - jobs:
--------------------------
Sql code executed on ux - jobs:
--------------------------
Sql code executed on mozilla-b2g32_v2_0 - jobs:
--------------------------
Sql code executed on comm-aurora - jobs:
--------------------------
Sql code executed on comm-beta - jobs:
--------------------------
Sql code executed on comm-central - jobs:
--------------------------
Sql code executed on comm-esr24 - jobs:
--------------------------
Sql code executed on mozilla-b2g28_v1_3t - jobs:
--------------------------
Sql code executed on mozilla-esr31 - jobs:
--------------------------
Sql code executed on staging-gaia-try - jobs:
--------------------------
Sql code executed on try-comm-central - jobs:
--------------------------
Sql code executed on mozilla-b2g34_v2_1 - jobs:
--------------------------
Sql code executed on comm-esr31 - jobs:
--------------------------
Sql code executed on mozilla-b2g34_v2_1s - jobs:
--------------------------
Sql code executed on mozilla-b2g37_v2_2 - jobs:
--------------------------
Sql code executed on bugzilla - jobs:
--------------------------
Sql code executed on bmo - jobs:
--------------------------
Sql code executed on mozilla-esr38 - jobs:
--------------------------
Sql code executed on comm-esr38 - jobs:
--------------------------
Sql code executed on bugzilla-master - jobs:
--------------------------
Sql code executed on bmo-master - jobs:
--------------------------
Sql code executed on bugzilla-5_0 - jobs:
--------------------------
Sql code executed on bugzilla-4_4 - jobs:
--------------------------
Sql code executed on bugzilla-4_2 - jobs:
--------------------------
Sql code executed on bmo-development - jobs:
real 0m3.456s
user 0m0.982s
sys 0m0.139s
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•