Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 455800 - Update database during migration to change NULL resolution values to empty string
Summary: Update database during migration to change NULL resolution values to empty st...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Database
Version: 3.2
Hardware: All
OS: Linux
low
low vote
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: RHBZ30UpgradeTracker
TreeView+ depends on / blocked
 
Reported: 2008-07-17 20:58 UTC by David Lawrence
Modified: 2013-06-24 04:04 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-07-30 20:15:19 UTC


Attachments (Terms of Use)
Patch to update bugs.resolution to empty string during database migration (v1) (deleted)
2008-07-17 22:36 UTC, David Lawrence
tfu: review-
Details | Diff
Patch to update bugs.resolution to empty string during database migration (v2) (deleted)
2008-07-18 03:47 UTC, David Lawrence
no flags Details | Diff

Description David Lawrence 2008-07-17 20:58:04 UTC
Description of problem:
Update db_fixup.sql to change all NULL resolution values in the bugs table to
empty strings to match the format 3.2 is expecting. Eventually this will be
fixed back to NULL along with the upstream.

Comment 1 David Lawrence 2008-07-17 22:36:01 UTC
Created attachment 312087 [details]
Patch to update bugs.resolution to empty string during database migration (v1)

Comment 2 David Lawrence 2008-07-17 22:36:30 UTC
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 3 Tony Fu 2008-07-18 03:30:45 UTC
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 '';
>+
>

Comment 4 David Lawrence 2008-07-18 03:47:03 UTC
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

Comment 5 David Lawrence 2008-07-23 20:58:27 UTC
Checked in fix to redhat/db_fixup.sql for this.

Comment 6 David Lawrence 2008-07-30 20:15:19 UTC
Pushed to partner-bugzilla.redhat.com today.


Note You need to log in before you can comment on or make changes to this bug.