#2512 closed defect (fixed)
NULL values in severity field cause partial trac-admin <env> upgrade
Reported by: | Owned by: | Christopher Lenz | |
---|---|---|---|
Priority: | high | Milestone: | 0.9.3 |
Component: | general | Version: | 0.9.2 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Upgrading from 0.8.4 to 0.9.2 and moving from sqlite 2 to sqlite 3
If the 'severity' field in the ticket table has null values, the trac-admin <env> upgrade script does not carry forward those records.
The upgrade script that contains this issue is: http://projects.edgewall.com/trac/browser/trunk/trac/upgrades/db13.py
<claw> cmlenz: I think the records that I'm missing have severity as NULL, and the queries in db13.py only look for = 'enhancement' and <> 'enhancement'; does that make sense? <cmlenz> hmm, that sounds like it might be the problem <cmlenz> try "WHERE COALESCE(severity, '') <> 'enhancement'" in db13.py (line 30)
I think the way that I got into this problem is because I had modified the newticket.cs template to not display the "Ticket Properties" section. This must have allowed the Severity to not be included in the SQL INSERT for a new ticket.
Attachments (0)
Change History (5)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Priority: | normal → high |
---|
comment:3 by , 19 years ago
Should I take care of this one, or have you (cmlenz) already started something? If yes, should we fix db13.py, create a new one, or both?
comment:4 by , 19 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
I'll take this. We definitely need to change db13.py
, because otherwise
the tickets will be gone when any additional upgrade scripts may be
reached ;-)
comment:5 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
You can workaround this but updating your severity column before doing the trac-admin <env> upgrade.