Do I need to run every database migration script when upgrading several peertube versions or just the most recent script?

I’m running v7.0.1 and I’m preparing to upgrade to v8.1.3.

The « important notes » sections for the releases v7.2.0, v8.0.0, and v8.1.0 each say to execute a migration script after upgrading.

Should I run ...peertube-7.2.js, then ...peertube-8.0.js, and then ...peertube-8.1.js, or just the last one?

You must run each migration file in the correct order :slight_smile:

Got it. Thanks!

Should the migration script be run before restarting the peertube systemd service?

Because sequelize won’t startup if the schema doesn’t match, right?

Edit: I figured it out. PeerTube needs to be restarted first. The order is:

  1. Upgrade
  2. Restart peertube.service
  3. Run migration script(s)