We’re happy to announce the release of our May 2023 schema change today! Thanks to all who were patient during today’s downtime as we released everything to our production servers, and thanks to CatQuest, jesus2099, and yindesu for creating tickets.
This is a fairly small schema change release which mostly removes unused code and improves things behind the scenes. Of the schema change tickets, there are only two that will directly affect users as they browse and edit in MusicBrainz.
The first (MBS-12800) makes it so that cancelled releases are ignored when calculating the first release dates for recordings and release groups; since something that was cancelled was by definition not released, it should not be used as a first release date.
The second (MBS-11312) lays the foundation for a new feature (MBS-4685) that will allow users to edit or delete their edit notes, as long as a set of conditions are met (see the edit note docs for details). Admins will be able to edit or delete any edit notes at any time (MBS-13084), mostly to get rid of spam or offensive content, but also to help any editor who cannot change their note anymore but has an important reason why they need to do so. This feature will be available for testing in our beta server on Tuesday and we expect to release it next week, assuming our beta testers don’t find any too big issue with it by then.
A new release of MusicBrainz Docker is also available that matches this update of MusicBrainz Server. See the release notes for update instructions.
Now, on to the instructions if you’re not using MusicBrainz Docker.
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-2023-05-15-schema-change. The rest of the instructions here assume an in-place upgrade.
- Make sure
DB_SCHEMA_SEQUENCE
is set to 27 inlib/DBDefs.pm
. - If you’re using the live data feed (your
REPLICATION_TYPE
is set toRT_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 #28, but the database is currently at #27.” - Take down the web server running MusicBrainz, if you’re running a web server.
- Turn off cron jobs if you’re automatically updating the database via cron jobs.
- Switch to the new code with
git fetch origin
followed bygit checkout v-2023-05-15-schema-change
. - Run
cpanm --installdeps --notest .
(note the dot at the end) to ensure your perl-based dependencies are up to date. - Run
./upgrade.sh
(it may take a while to vacuum at the end). - Set
DB_SCHEMA_SEQUENCE
to 28 inlib/DBDefs.pm
as instructed by the output of./upgrade.sh
. - Turn cron jobs back on, if applicable.
- Restart the MusicBrainz web server, if applicable. If you’re accessing your MusicBrainz server in a web browser, run
./script/compile_resources.sh
.
Here’s the list of resolved tickets:
Improvement
- [MBS-12800] – Exclude cancelled releases when calculating first recording / release group dates
Task
- [MBS-11312] – Extend the database schema to support modifying/removing edit notes
- [MBS-12107] – Replication with dbmirror2 (bugfixes and enabled by default)
- [MBS-12370] – Rename schema change upgrade script suffixes to clearly indicate which nodes they run on
- [MBS-12573] – Drop unused
degraded
column fromcdtoc
table - [MBS-12704] – Remove historical “Watch artist” code
The full dumps from 2023.05.15 are the last one for DB_SCHEMA_SEQUENCE #27, correct?
No, they should be the first of DB_SCHEMA_SEQUENCE #28.
getting the error below trying to perform the steps noted in the release notes.
ERROR: .IsADirectoryError: [Errno 21] Is a directory: ‘./local/’
@Lee, I cannot reproduce your issue so I guess this is specific to your platform/operating system. Please report this issue to either https://tickets.metabrainz.org/projects/MBVM/summary or https://github.com/metabrainz/musicbrainz-docker/issues and provide some details about your setup.