We’ve just completed our extra schema upgrade. The full instructions for upgrade follow:
Schema 16 to schema 17 upgrade
If you already ran the migration that was announced May 15th, or if you imported a data dump from May 15th or later, skip to the next section.
- Run replication with
carton exec -Ilib -- ./admin/replication/LoadReplicationChanges until it cannot apply any packets in schema 16.
- 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.
- Make sure your
REPLICATION_TYPE setting is RT_SLAVE in lib/DBDefs.pm
- Switch to the new code with
git fetch origin followed by git checkout schema-16-to-17
- Run
carton install --deployment to install any new perl modules.
- Run
carton exec -Ilib -- ./upgrade.sh from the top of the source directory.
- Set
DB_SCHEMA_SEQUENCE to 17 in lib/DBDefs.pm
- Turn cron jobs back on, if needed.
- Restart the MusicBrainz web server, if needed.
Schema 17 to schema 18 upgrade
- Run replication with
carton exec -Ilib -- ./admin/replication/LoadReplicationChanges until it cannot apply any packets in schema 17.
- 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.
- Make sure your
REPLICATION_TYPE setting is RT_SLAVE in lib/DBDefs.pm
- Switch to the new code with
git fetch origin followed by git checkout v-2013-05-24
- Run
carton exec -Ilib -- ./upgrade.sh from the top of the source directory.
- Set
DB_SCHEMA_SEQUENCE to 18 in lib/DBDefs.pm
- Turn cron jobs back on, if needed.
- Restart the MusicBrainz web server, if needed. EDIT: also restart memcached here, see http://tickets.musicbrainz.org/browse/MBS-6376
Note that the tags to check out for the two migrations are different.
Changes
For the list of changes in schema 17, see the former blog post. The changes for schema 18 are:
- Fix the track table corruption that the schema 16-17 upgrade created, by importing a copy of the ‘track’ table from the production database.
- Fix some indexes and constraints that should not be on slaves or which had bad names starting with ‘medium2013’ or ‘track2013’
- Create a missing index on
medium.release that dramatically improves performance.
- Fix the
ref_count column of the artist_credit table, which was not updated properly at the schema 16-17 upgrade.