diff --git a/docs/docs/administration/upgrade/0.1.4.md b/docs/docs/administration/upgrade/0.1.4.md index 9fd47fd678..04866d4123 100644 --- a/docs/docs/administration/upgrade/0.1.4.md +++ b/docs/docs/administration/upgrade/0.1.4.md @@ -149,10 +149,11 @@ If you installed Mathesar [from scratch](../../installation/build-from-source/in !!! note Your installation directory may be different from above if you used a different directory when installing Mathesar. -1. Pull the latest version from the repository +1. Pull version 0.1.4 from the repository ``` git pull https://github.com/mathesar-foundation/mathesar.git + git checkout 0.1.4 ``` 1. Update Python dependencies diff --git a/docs/docs/administration/upgrade/0.1.5.md b/docs/docs/administration/upgrade/0.1.5.md index 62c0a7ccb7..012c2921f0 100644 --- a/docs/docs/administration/upgrade/0.1.5.md +++ b/docs/docs/administration/upgrade/0.1.5.md @@ -14,4 +14,4 @@ docker compose -f /etc/mathesar/docker-compose.yml up --pull always -d ### For installations done from scratch -If you installed from scratch, the upgrade instructions are the same as [for 0.1.4](../upgrade/0.1.4.md#scratch), but you can skip Step 5 – you do not need to change the environment variables. +If you installed from scratch, the upgrade instructions are the same as [for 0.1.4](./0.1.4.md#scratch), except that you'll need to specify version 0.1.5 when pulling code from the repository in Step 2. You should also skip Step 5 – you do not need to change the environment variables. diff --git a/docs/docs/administration/upgrade/0.1.6.md b/docs/docs/administration/upgrade/0.1.6.md new file mode 100644 index 0000000000..67a779abe0 --- /dev/null +++ b/docs/docs/administration/upgrade/0.1.6.md @@ -0,0 +1,86 @@ +# 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 +``` + +!!! warning "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](../../installation/build-from-source/index.md), 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. + +1. Pull version 0.1.6 from the repository + + ``` + git pull https://github.com/mathesar-foundation/mathesar.git + git checkout 0.1.6 + ``` + +1. Update Python dependencies + + ``` + pip install -r requirements-prod.txt + ``` + +1. Activate our virtual environment + + ``` + source ./mathesar-venv/bin/activate + ``` + +1. 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](../../configuration/env-variables.md#db). + - 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. + +1. Add the environment variables to the shell before running Django commands + + ``` + export $(sudo cat .env) + ``` + +1. Run Django migrations + + ``` + python manage.py migrate + ``` + +1. 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 + ``` + +1. Compile Mathesar translation files + + ``` + python manage.py compilemessages + ``` + +1. Update Mathesar functions on the database: + + ``` + python -m mathesar.install --skip-confirm | tee /tmp/install.py.log + ``` + +1. Restart the gunicorn server + + ``` + systemctl restart gunicorn + ``` diff --git a/docs/docs/installation/build-from-source/index.md b/docs/docs/installation/build-from-source/index.md index 669f2037e8..e28efe0bf7 100644 --- a/docs/docs/installation/build-from-source/index.md +++ b/docs/docs/installation/build-from-source/index.md @@ -78,12 +78,6 @@ Then press Enter to customize this guide with your domain name. CREATE DATABASE mathesar_django OWNER mathesar; ``` -1. Now we let us create a database for storing your data. - - ```postgresql - CREATE DATABASE your_db_name OWNER mathesar; - ``` - 1. Press Ctrl+D to exit the `psql` shell. @@ -132,7 +126,7 @@ Then press Enter to customize this guide with your domain name. 1. Clone the git repo into the installation directory. ``` - git clone https://github.com/centerofci/mathesar.git . + git clone https://github.com/mathesar-foundation/mathesar.git . ``` 1. Checkout the tag of the latest stable release, `{{mathesar_version}}`. @@ -144,9 +138,6 @@ Then press Enter to customize this guide with your domain name. !!! warning "Important" If you don't run the above command you'll end up installing the latest _development_ version of Mathesar, which will be less stable. - !!! tip - You can install a specific Mathesar release by running commands like `git checkout 0.1.1` (to install version 0.1.1, for example). You can see all available versions by running `git tag`. - 1. We need to create a python virtual environment for the Mathesar application. ``` @@ -219,7 +210,7 @@ Then press Enter to customize this guide with your domain name. ``` wget https://github.com/mathesar-foundation/mathesar/releases/download/{{mathesar_version}}/static_files.zip - unzip static_files.zip && mv static_files mathesar/static/mathesar + unzip static_files.zip && mv static_files mathesar/static/mathesar && rm static_files.zip ``` diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 14b7694719..9651abceb1 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -14,6 +14,7 @@ nav: - Environment variables: configuration/env-variables.md - Administration: - Upgrade: + - To 0.1.6: administration/upgrade/0.1.6.md - To 0.1.5: administration/upgrade/0.1.5.md - To 0.1.4: administration/upgrade/0.1.4.md - To older versions: administration/upgrade/older.md