Server upgrade and schema change, 2014-05-14

Hello again! This fortnight, as we’ve mentioned among the past few posts, is our twice-annual schema change release! This means that we’ve got some big changes, as well as special upgrade instructions.

In the former category, we’ve added support for two new entities: Series and Instruments, each of which is exactly what it sounds like. We’ve also done some various cleanup (tables missing from replication, making some attribute-style tables (e.g., label types) trees, and more properly orderable, removing unuseful sortnames). In non-schema-change fixes, we’ve fixed some merging for Artist Credits, show Area names after Places routinely, and perhaps most excitingly, added smaller versions of the relationship editor for other entities. It’s now possible to add relationships to any entity from most entity edit pages, expanding on our previous addition of URL editing!

As far as upgrading:

  1. 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).
  2. Take down the web server running MusicBrainz, if you’re running a web server.
  3. Turn off cron jobs if you are automatically updating the database via cron jobs.
  4. Make sure your REPLICATION_TYPE setting is RT_SLAVE
  5. Switch to the new code with git fetch origin followed by git checkout v-2014-05-14-schema-change
  6. Run ./upgrade.sh (or carton exec -Ilib -- ./upgrade.sh if you’re using carton, with older installs).
  7. Set DB_SCHEMA_SEQUENCE to 20 in lib/DBDefs.pm
  8. Turn cron jobs back on, if needed.
  9. Restart the MusicBrainz web server, if applicable. It’s also recommended you restart memcached.

The git tag for this release, as mentioned above in the instructions, is v-2014-05-14-schema-change.

Full release notes, as usual:

Bug

  • [MBS-5978] – Replication feed is missing release_tag
  • [MBS-6709] – “None” is no longer the last Packaging type after adding Book and Cassette Case
  • [MBS-7482] – Artist merge with AC renaming does not merge identical ACs

Improvement

  • [MBS-2410] – Label types not a tree anymore
  • [MBS-2714] – Add support for Series.
  • [MBS-5897] – Make it possible to see edit JSON in the case of an ISE or poor data display
  • [MBS-6144] – Remove the apparently-unused script_language table
  • [MBS-6602] – Remove sortnames from areas
  • [MBS-6603] – Remove sortnames from labels
  • [MBS-6651] – Make it possible to disable dates for relationship types
  • [MBS-6886] – Display area after place names
  • [MBS-6887] – Model coordinates without nullable latitude and longitude
  • [MBS-7205] – Link types should track assumed cardinality
  • [MBS-7411] – Don’t require disambiguation comments for places from different areas
  • [MBS-7470] – Merging/combining RG types (primary/secondary) is unintuitive

New Feature

  • [MBS-3674] – Make instruments entities
  • [MBS-6234] – Add a relationship editor to artists, labels, recordings, release-groups, places, areas and works

Task

  • [MBS-7441] – Check non-replicated changes to DB that have happened since last schema change

4 thoughts on “Server upgrade and schema change, 2014-05-14

  1. Tomasz Grzywalski

    Hi,
    I know this might sound like a lame question, but how do I “Take down the web server running MusicBrainz”?
    Believe it or not, but I’ve spent an hour trying to figure it out and nothing. When I kill the ‘app.psgi’ or ‘plackup’ processes they keep coming back.

  2. Tomasz Grzywalski

    I have managed to find a workaround. I guess this is not the best way to do it, but I’ll post it anyway until someone gives a better solution.

    I’m using MusicBrainz VM version 2013-10-14 on VirtualBox.
    – In the VM, sudo to root and rename /etc/service to something else, like /etc/service_hidden
    – Restart the VM (In VirtualBox I use ‘ACPI Shutdown’ and ‘Start’)
    – The VM starts, but whatever keeps web server alive cannot find it’s config so it doesn’t start
    – Perform upgrade procedure as described above
    – Rename the folder back to /etc/service
    – Restart VM

  3. Dan

    how do I
    Set DB_SCHEMA_SEQUENCE to 20 in lib/DBDefs.pm

    I tried open the file in nano but is asked me for my password for musicbrainz:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s