Skip to content

Bug 1534305 - Preserve multiple aliases when upgrading from 5.x - #198

Open
topunix wants to merge 1 commit into
bugzilla:mainfrom
topunix:bug-1534305
Open

topunix wants to merge 1 commit into
bugzilla:mainfrom
topunix:bug-1534305

Conversation

@topunix

@topunix topunix commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Bugzilla 5.0 and 5.2 moved aliases into a bugs_aliases table and dropped bugs.alias. Harmony re-creates bugs.alias empty during checksetup (Bugzilla/Install/DB.pm:287), so a 5.x upgrade currently loses every alias.

This is the migration-only approach agreed with Dave on Oct 15:

  • When checksetup re-creates bugs.alias on a database that has bugs_aliases, each bug's alias is set to its first alias in sorted order (MIN(alias), matching the ORDER BY alias used by 5.x Bug.pm).
  • bugs_aliases is left untouched and is not used by 6.0 code. It is not added to Schema.pm, so fresh installs do not get it.
  • The migration runs only on the checksetup run that re-creates the column, so it cannot restore aliases cleared later or collide with aliases set later.
  • One sentence added to docs/en/rst/installing/upgrading.rst.

Tested against a simulated 5.x schema: aliases migrated, bugs_aliases unchanged, rerun is a no-op, a cleared alias stays cleared, REST lookup by alias works. Databases without bugs_aliases (4.4 path) are unaffected. prove t/ passes apart from the existing bounced-emails.t failure; the bmo option passes.

This covers the "Multiple aliases was reverted" item under "Upgrade Path" in RELEASE_BLOCKERS.md and is one of the dependencies of 1896011.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant