Skip to content

Upgrade Mathesar to 0.1.6

For installations using Docker Compose

If you have a Docker compose installation (including one from the guided script), run the command below:

docker compose -f /etc/mathesar/docker-compose.yml up --pull always -d

Your installation directory may be different

You may need to change /etc/mathesar/ in the command above if you chose to install Mathesar to a different directory.

For installations done from scratch

If you installed Mathesar from scratch, then use these steps to upgrade your installation to 0.1.6.

  1. Go to your Mathesar installation directory

    cd xMATHESAR_INSTALLATION_DIRx
    

    Note

    Your installation directory may be different from above if you used a different directory when installing Mathesar.

  2. Pull version 0.1.6 from the repository

    git pull https://github.com/mathesar-foundation/mathesar.git
    git checkout 0.1.6
    
  3. Update Python dependencies

    pip install -r requirements-prod.txt
    
  4. Activate our virtual environment

    source ./mathesar-venv/bin/activate
    
  5. You can skip the following if you’re upgrading from versions 0.1.4 and above.

    • If you’re upgrading from versions <= 0.1.3, update your environment variables according to the the new configuration specification.
    • In particular, you must put the connection info for the internal DB into new POSTGRES_* variables. The DJANGO_DATABASE_URL variable is no longer supported.
  6. Add the environment variables to the shell before running Django commands

    export $(sudo cat .env)
    
  7. Run Django migrations

    python manage.py migrate
    
  8. Download and extract frontend assets

    wget https://github.com/mathesar-foundation/mathesar/releases/download/0.1.6/static_files.zip
    unzip static_files.zip && mv static_files mathesar/static/mathesar && rm static_files.zip
    
  9. Compile Mathesar translation files

    python manage.py compilemessages
    
  10. Update Mathesar functions on the database:

    python -m mathesar.install --skip-confirm | tee /tmp/install.py.log
    
  11. Restart the gunicorn server

    systemctl restart gunicorn