Closed Bug 286689 Opened 20 years ago Closed 20 years ago

Cross-DB bz_add_index and bz_drop_index

Categories

(Bugzilla :: Installation & Upgrading, enhancement, P1)

2.19.2
enhancement

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file)

We don't need a bz_rename_index. I'm fairly sure that these are the last two Bugzilla::DB functions that need to be created.
OK, here we go. After this one comes the REAL heavy lifting (actual checksetup modifications).
Attachment #177842 - Flags: review?(Tomas.Kopal)
Status: NEW → ASSIGNED
Flags: blocking2.20?
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.20
Comment on attachment 177842 [details] [diff] [review] add_index and drop_index >+ print "Adding new index $name to table $table ...\n"; >+ print "Removing index '$name' from the $table table...\n"; >+ die "Attempted to delete nonexistent index $name on the $table table" Nit: make the messages a bit more consistent :-). > $dbh->bz_add_column($table, $name, \%definition); >+ $dbh->bz_add_index($table, $name, $definition); Why has the definition different type here? It's used in the same way, isn't it? Otherwise, looks good.
Attachment #177842 - Flags: review?(Tomas.Kopal) → review+
(In reply to comment #2) > > $dbh->bz_add_column($table, $name, \%definition); > >+ $dbh->bz_add_index($table, $name, $definition); > > Why has the definition different type here? It's used in the same way, isn't > it? Actually, no. Index definitions can be either arrayrefs or hashrefs. Some day I will re-arch that, but not now. :-)
Flags: approval?
Blocks: 284850
Flags: blocking2.20?
Flags: blocking2.20+
Flags: approval?
Flags: approval+
Checking in Bugzilla/DB.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB.pm,v <-- DB.pm new revision: 1.41; previous revision: 1.40 done Checking in Bugzilla/DB/Schema.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Schema.pm,v <-- Schema.pm new revision: 1.14; previous revision: 1.13 done Checking in Bugzilla/DB/Schema/Mysql.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Schema/Mysql.pm,v <-- Mysql.pm new revision: 1.4; previous revision: 1.3 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: