When to apply manage db upgrade step

Issue Summary

I’m looking at https://redash.io/help/open-source/admin-guide/how-to-upgrade and step 5 states:

Apply migration (if necessary): docker-compose run --rm server manage db upgrade

When is it necessary and how do i know? I imagine if i’m hosting in docker on an ec2 instance, that any time the image versions are changed the upgrade command would need to be issued against the database, right? When would this not be necessary?

Technical details:

  • Redash Version: 5+
  • Browser/OS: Linux
  • How did you install Redash: setup.sh to deploy the docker containers originally.

You can read the code for manage db upgrade here. Migrations are needed whenever the database schema changes. But it doesn’t hurt to run manage db upgrade anyway. One case where it wouldn’t be necessary to run migrations is for a patch that closes a security vulnerability.

Thanks for the response. While “read the code” isn’t great from a usability stand point, understood. Maybe i’ll think about submitting a pull request to the upgrade docs to clarify.