Bug 455800
Summary: | Update database during migration to change NULL resolution values to empty string | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Community] Bugzilla | Reporter: | David Lawrence <dkl> | ||||||
Component: | Database | Assignee: | David Lawrence <dkl> | ||||||
Status: | CLOSED NEXTRELEASE | QA Contact: | |||||||
Severity: | low | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 3.2 | ||||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2008-07-30 20:15:19 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 406071 | ||||||||
Attachments: |
|
Description
David Lawrence
2008-07-17 20:58:04 UTC
Created attachment 312087 [details]
Patch to update bugs.resolution to empty string during database migration (v1)
Comment on attachment 312087 [details]
Patch to update bugs.resolution to empty string during database migration (v1)
Tony please verify that this looks okay.
Thanks
Dave
Comment on attachment 312087 [details] Patch to update bugs.resolution to empty string during database migration (v1) >Index: redhat/db_fixup.sql >=================================================================== >RCS file: /cvs/qa/rh_bugzilla_3/redhat/db_fixup.sql,v >retrieving revision 1.13 >diff -u -r1.13 db_fixup.sql >--- redhat/db_fixup.sql 26 Jun 2008 15:51:41 -0000 1.13 >+++ redhat/db_fixup.sql 17 Jul 2008 22:34:31 -0000 >@@ -331,4 +331,9 @@ > > --- Create new columns in fielddefs needed for public custom field support > ALTER TABLE fielddefs ADD COLUMN public tinyint(4) NOT NULL default '0'; >+ >+--- Update bugs table, set NULL resolution values to empty string >+UPDATE bugs SET resolution = '' WHERE resolution = NULL; --- xxx-tfu: Mysql uses "IS NULL" rather than "=null" to check NULL value, so the above query should be --- UPDATE bugs SET resolution = '' WHERE resolution IS NULL; >+ALTER TABLE bugs MODIFY resolution VARCHAR(64) NOT NULL DEFAULT ''; >+ > Created attachment 312098 [details]
Patch to update bugs.resolution to empty string during database migration (v2)
Ugh, I knew that but went brain dead when I wrote that. Good catch. Here is an
updated patch.
Thanks
Dave
Checked in fix to redhat/db_fixup.sql for this. Pushed to partner-bugzilla.redhat.com today. |