Bug 435667 - Bugzilla data cleanup - bugs.rep_platform data cleanup
Bugzilla data cleanup - bugs.rep_platform data cleanup
Status: CLOSED CURRENTRELEASE
Product: Bugzilla
Classification: Community
Component: Bugzilla General (Show other bugs)
devel
All Linux
medium Severity medium (vote)
: ---
: ---
Assigned To: Tony Fu
:
Depends On:
Blocks: 431402
  Show dependency treegraph
 
Reported: 2008-03-03 02:05 EST by Tony Fu
Modified: 2013-06-24 00:19 EDT (History)
0 users

See Also:
Fixed In Version: 2.18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-28 20:42:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
change bugs.rep_platform's value from "PC" to "i386" (2.43 KB, text/plainc)
2008-03-11 01:14 EDT, Tony Fu
dkl: review+
Details

  None (edit)
Comment 1 David Lawrence 2008-03-04 11:18:57 EST
Tony, for these just go to the three bugs in question on the live site and
change the rep_platform values to the following:

arm -> arm7
PC -> i386

Since there are only three then it is easy just to change the bugs.
And then close this out.

Thanks
Dave
Comment 2 Tony Fu 2008-03-05 01:21:21 EST
Dave,

I have updated three bugs that have arm as rep_platform value.

There are 433 bugs that have PC as rep_platform value and we can use the
following sql query to change them to i386

UPDATE bugs SET rep_platform='i386' WHERE rep_platform='pc';


Tony
Comment 3 David Lawrence 2008-03-05 10:41:04 EST
(In reply to comment #2)
> Dave,
> 
> I have updated three bugs that have arm as rep_platform value.
> 
> There are 433 bugs that have PC as rep_platform value and we can use the
> following sql query to change them to i386
> 
> UPDATE bugs SET rep_platform='i386' WHERE rep_platform='pc';

Hmm, I didn't realize there were so many. We will need to write a script that
does the bugs table update as you mention but I think we also need to insert the
changes into the bugs_activity log. I originally thought there were only a few
which we could have just changed through the UI which does the activity for us.

Tony, can you create a script for this?

Thanks
Dave

Comment 4 Tony Fu 2008-03-11 01:14:01 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > Dave,
> > 
> > I have updated three bugs that have arm as rep_platform value.
> > 
> > There are 433 bugs that have PC as rep_platform value and we can use the
> > following sql query to change them to i386
> > 
> > UPDATE bugs SET rep_platform='i386' WHERE rep_platform='pc';
> 
> Hmm, I didn't realize there were so many. We will need to write a script that
> does the bugs table update as you mention but I think we also need to insert the
> changes into the bugs_activity log. I originally thought there were only a few
> which we could have just changed through the UI which does the activity for us.
> 
> Tony, can you create a script for this?
> 
> Thanks
> Dave
> 
> 

Please see attachment for the script.

Thanks,
Tony
Comment 5 Tony Fu 2008-03-11 01:14:59 EDT
Created attachment 297560 [details]
change bugs.rep_platform's value from "PC" to "i386"
Comment 6 David Lawrence 2008-03-16 23:52:39 EDT
Comment on attachment 297560 [details]
change bugs.rep_platform's value from "PC" to "i386"

Code looks good Tony. Please run on bz-db1-test.devel.redhat.com 'bugs2'
database and verify that data is proper converted. Also look through some
sample bug reports on bz-web1-test.devel.redhat.com. If it looks good, then
check the script into redhat directory in CVS. Put this bug into MODIFIED state
and we will schedule it to be ran on live for Thursday.

Thanks
Dave
Comment 7 Tony Fu 2008-03-17 21:49:34 EDT
(In reply to comment #6)
> (From update of attachment 297560 [details] [edit])
> Code looks good Tony. Please run on bz-db1-test.devel.redhat.com 'bugs2'
> database and verify that data is proper converted. Also look through some
> sample bug reports on bz-web1-test.devel.redhat.com. If it looks good, then
> check the script into redhat directory in CVS. Put this bug into MODIFIED state
> and we will schedule it to be ran on live for Thursday.
> 
> Thanks
> Dave
> 

I have tested this script against bugs2 db on bz-db1-test.devel.redhat.com and
it looked good.

checked this script into redhat directory in CVS repository.

Tony
Comment 8 David Lawrence 2008-05-28 13:18:11 EDT
Tony, I cannot remember, was this ran on production during one of our thursday
updates? If yes, please close this as CURRENTRELEASE/2.18

Thanks
Dave
Comment 9 Tony Fu 2008-05-28 20:41:26 EDT
(In reply to comment #8)
> Tony, I cannot remember, was this ran on production during one of our thursday
> updates? If yes, please close this as CURRENTRELEASE/2.18
> 
> Thanks
> Dave

Dave,

I think we have done it on production server.

mysql> select count(bug_id) from bugs where rep_platform='arm';
+---------------+
| count(bug_id) |
+---------------+
|             0 | 
+---------------+
1 row in set (0.30 sec)

mysql> select count(bug_id) from bugs where rep_platform='pc';
+---------------+
| count(bug_id) |
+---------------+
|             0 | 
+---------------+
1 row in set (0.30 sec)

Close this bug.

Tony

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