Move most of checksetup's schema updates into Bugzilla::Install::DB

RESOLVED FIXED in Bugzilla 3.0

Status

()

Bugzilla
Installation & Upgrading
--
enhancement
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: Max Kanat-Alexander, Assigned: Max Kanat-Alexander)

Tracking

2.23
Bugzilla 3.0
Dependency tree / graph
Bug Flags:
approval +

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

12 years ago
Okay, this is the big one. The whole --TABLE-- section of schema updates is going to be moved into Bugzilla::Install::DB.

I'm going to create one function: update_table_definitions. This is going to call a bunch of other private functions, so that it will be easy to read.

I may do this in pieces, we'll see.
(Assignee)

Comment 1

12 years ago
Okay, it turns out that this patch depends on bug 289357, which requires review.

So, in order to avoid some terrible bitrot, I'm only going to move *most* changes into the module, in this patch. I'll leave a lot of the most recent changes in checksetup for now, and that way if there are any checkins before I check in this patch, it won't bitrot horribly.
Depends on: 289357
Summary: Move checksetup's schema updates into Bugzilla::Install::DB → Move most of checksetup's schema updates into Bugzilla::Install::DB
(Assignee)

Comment 2

12 years ago
Created attachment 231584 [details] [diff] [review]
v1

Okay, here's the patch. Here's what I've done:

1) Created Bugzilla::Install::DB.
2) Created a useful indicate_progress subroutine in there that people should use
   all the time if they're going to do something that takes a long time.
3) Split up all of the stuff that checksetup does with the tables into 
   individual subroutines that are all called by one main subroutine.
4) Fixed up some of the code that migrates groups from 2.16 so that it inserts
   users into the admin group directly, instead of waiting for checksetup
   to insert them into the admin group later.
Assignee: installation → mkanat
Status: NEW → ASSIGNED
(Assignee)

Comment 3

12 years ago
Requesting approval directly, as module owner, even though the patch isn't ready to check in yet (because it depends on bug 289357 being reviewed and checked in first).
Flags: approval?
Flags: approval? → approval+
(Assignee)

Comment 4

12 years ago
Because of a checkin fix on bug 289357, I had to manually modify the patch before checking it in. I'll attach the fixed patch.

Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.533; previous revision: 1.532
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/DB.pm,v
done
Checking in Bugzilla/Install/DB.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/DB.pm,v  <--  DB.pm
initial revision: 1.1
done
Checking in Bugzilla/Install/Filesystem.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/Filesystem.pm,v  <--  Filesystem.pm
new revision: 1.5; previous revision: 1.4
done
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Assignee)

Comment 5

12 years ago
Created attachment 231838 [details] [diff] [review]
Checked-In Version
Attachment #231584 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.