Our previously mentioned schema change release is finished! Below will be upgrade instructions, including configuration updates for replication access tokens.
This release does not include UI for several of the schema change patches, which will (hopefully) happen for next release on June 1. The incomplete patches are MBS-7489 (credits for artists in relationships), MBS-4145 (tag upvote/downvote), and MBS-8004 (collections for additional entity types). These patches have had their schema change components finished, but the UI was incomplete or needed more work.
Schema Change Upgrade Instructions
These are largely as previous upgrade instructions, using the tag v-2015-05-18-schema-change
. The primary difference is the inclusion of configuring an access token for replication.
- Make sure your
REPLICATION_TYPE
setting isRT_SLAVE
and yourDB_SCHEMA_SEQUENCE
is set to 21 inlib/DBDefs.pm
. If you’re running a standalone server, you can run the upgrade, but it may be easier to just import a new data dump! - 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 update, it should say “Mismatched schema sequence, 21 (database) vs 22 (replication packet)”). - Take down the web server running MusicBrainz, if you’re running a web server.
- Turn off cron jobs if you are automatically updating the database via cron jobs.
- Switch to the new code with
git fetch origin
followed bygit checkout v-2015-05-18-schema-change
- Run
./upgrade.sh
(orcarton exec -Ilib -- ./upgrade.sh
if you’re using carton, with very old setups). - Run
cpanm --installdeps --notest .
to ensure your perl-based dependencies are up to date. This release adds a dependency onLWP::Protocol::https
, for fetching replication packets from the new server; many systems may already have this installed, but it should be verified. - Set
DB_SCHEMA_SEQUENCE
to 22 inlib/DBDefs.pm
as instructed by the output of./upgrade.sh
- Assuming you have been updating your server with replication, it will now be necessary to configure an access token:
- Go to https://metabrainz.org/supporters/account-type and choose your account type as applicable. If you’re an individual, non-commercial user of the data, choose “non-commercial”; if not, choose an applicable tier in the “commercial” section. If you’re not sure of the appropriate tier, make your best guess; it can be adjusted if necessary.
- Then, from https://metabrainz.org/profile, create an access token, which should be a 40-character random alphanumeric string provided by the site.
- Finally, add this token to
lib/DBDefs.pm
under theREPLICATION_ACCESS_TOKEN
configuration option. The final configuration section should look something likesub REPLICATION_ACCESS_TOKEN { "ck3UpgwgOXhWC6SpFcd99rZOTjzfrei3gQlgZZ9z" }
. - Don’t reveal your access token! If you do, inadvertently, you can use the MetaBrainz site to generate a new token, invalidating the old one. (The one in the example above is one I created for myself and then invalidated — don’t get any ideas, it won’t work!)
- Turn cron jobs back on, if applicable.
- Restart the MusicBrainz web server, if applicable. It’s also recommended you restart memcached.
Finally, the list of bugs closed this release:
Bug
- [MBS-4436] – Medium titles cannot be longer than 255 charaters
Improvement
- [MBS-1347] – Implement aliases for release groups, releases and recordings
- [MBS-7906] – maybe don’t show “”≠null diff. in edit pages
- [MBS-8279] – Remove empty_artists etc. database functions
New Feature
- [MBS-8302] – Add Live Data Feed access token support
Task
- [MBS-8266] – Make medium titles VARCHAR NOT NULL
- [MBS-8278] – Update DB_SCHEMA_SEQUENCE in DbDefs.pm.sample
- [MBS-8283] – Remove DB constraint that disallows empty event names
Not included in this list but also relevant is MBS-8349, which while fixed for a previous release, in this release is also applied to old slave servers, which may help performance for some queries.