MusicBrainz database schema change release, 2025-05-19 (with upgrade instructions)

We’re happy to announce the release of our May 2025 database schema change now! Thanks to all who were patient during Monday’s downtime as we released everything to our production servers.

This is a fairly small database schema change release which mostly makes minor improvements and fixes small bugs. Of the schema change tickets, the one you are most likely to notice while you browse and edit in MusicBrainz is MBS-9253 (which makes it possible to change the order in which we display release groups, and mean EPs now sort before singles). MBS-13832 means releases which have PDF front images now also show the cover art on the sidebar, and MBS-13768 provides permanent links to mediums.

Thanks to Brownd, salo.rock and silentbird for having reported bugs and suggested improvements, and thanks to BenjaBarcos1, Echelon, Joax, Marc Riera, Michal77, onemanue, ozodbekmirzayev and salo.rock for updating the translations.

A new release of MusicBrainz Docker is also available that matches this update of MusicBrainz Server. See the release notes for update instructions.

P.S. Search upgrades occurred separately ten days later.

Now, on to the instructions if you’re not using MusicBrainz Docker.

Database Schema Change Upgrade Instructions

Note: Importing the latest data dump is always a valid alternative to running ./upgrade.sh on an existing database, if you’d prefer to also get new data in one go. Just follow the relevant instructions in INSTALL.md. The git tag is v-2025-05-23.0-schema-change. The rest of the instructions here assume an in-place upgrade.

  1. Make sure DB_SCHEMA_SEQUENCE is set to 29 in lib/DBDefs.pm.
  2. If you’re using the live data feed (your REPLICATION_TYPE is set to RT_MIRROR), ensure you’ve replicated up to the most recent replication packet available with the old schema. If you’re not sure, run ./admin/replication/LoadReplicationChanges and see what it tells you; if you’re ready to upgrade, it should say “This replication packet matches schema sequence #30, but the database is currently at #29.”
  3. Take down the web server running MusicBrainz, if you’re running a web server.
  4. Turn off cron jobs if you’re automatically updating the database via cron jobs.
  5. Switch to the new code with git fetch origin followed by git checkout v-2025-05-23.0-schema-change.
  6. Run cpanm --installdeps --notest . (note the dot at the end) to ensure your perl-based dependencies are up to date.
  7. Run ./upgrade.sh (it may take a while to vacuum at the end).
  8. Rebuild materialized tables that were emptied during ./upgrade.sh (optional, requires 8 GB of space): ./admin/BuildMaterializedTables --cluster recording_first_release_date artist_release artist_release_group.
  9. Set DB_SCHEMA_SEQUENCE to 30 in lib/DBDefs.pm as instructed by the output of ./upgrade.sh.
  10. Turn cron jobs back on, if applicable.
  11. Restart the MusicBrainz web server, if applicable. If you’re accessing your MusicBrainz server in a web browser, run ./script/compile_resources.sh.

That’s all for the upgrade instructions. Here’s the list of resolved tickets:

Fixed Bug

  • [MBS-13322] – Race condition when removing unused URLs
  • [MBS-13464] – Inconsistent sorting of artist release/release group titles
  • [MBS-13964] – Some recordings are missing a first release date
  • [MBS-13966] – Calculate first release dates for empty release groups

New Feature

Improvement

  • [MBS-9253] – List EP release groups above singles on artist pages
  • [MBS-13832] – Also support PDF files in CAA / EAA index_listing (for is_front purposes)

Leave a Reply

Your email address will not be published. Required fields are marked *