From d51cb4b74dd55b693facec5083d5e26e96805bf2 Mon Sep 17 00:00:00 2001 From: pavish Date: Fri, 22 Mar 2024 20:01:34 +0530 Subject: [PATCH 01/10] Fix git repo link --- docs/docs/installation/build-from-source/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/installation/build-from-source/index.md b/docs/docs/installation/build-from-source/index.md index 669f2037e8..a85a989ff3 100644 --- a/docs/docs/installation/build-from-source/index.md +++ b/docs/docs/installation/build-from-source/index.md @@ -132,7 +132,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}}`. From 553612c8f4f5ad67e0e5b5d8160bd34267dbfe0c Mon Sep 17 00:00:00 2001 From: pavish Date: Fri, 22 Mar 2024 20:01:54 +0530 Subject: [PATCH 02/10] Remove static_files.zip once extracted --- docs/docs/installation/build-from-source/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/installation/build-from-source/index.md b/docs/docs/installation/build-from-source/index.md index a85a989ff3..a706fde6eb 100644 --- a/docs/docs/installation/build-from-source/index.md +++ b/docs/docs/installation/build-from-source/index.md @@ -219,7 +219,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 ``` From 017841e4070aaa814aad54a506aa5a4620c66915 Mon Sep 17 00:00:00 2001 From: pavish Date: Fri, 22 Mar 2024 20:03:11 +0530 Subject: [PATCH 03/10] Remove need to create user database --- docs/docs/installation/build-from-source/index.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/docs/installation/build-from-source/index.md b/docs/docs/installation/build-from-source/index.md index a706fde6eb..ef10aa57a1 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. From d86839392f2ce0411dad0e68dba23a11b0c5e45b Mon Sep 17 00:00:00 2001 From: pavish Date: Fri, 22 Mar 2024 20:05:30 +0530 Subject: [PATCH 04/10] Fix link --- docs/docs/administration/upgrade/0.1.5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/administration/upgrade/0.1.5.md b/docs/docs/administration/upgrade/0.1.5.md index 62c0a7ccb7..9ad35a7133 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), but you can skip Step 5 – you do not need to change the environment variables. From d85285166e32fb3e4ac9f6ab37432c9b41a62a92 Mon Sep 17 00:00:00 2001 From: pavish Date: Fri, 22 Mar 2024 21:06:41 +0530 Subject: [PATCH 05/10] Add upgrade instructions for 0.1.6 --- docs/docs/administration/upgrade/0.1.6.md | 86 +++++++++++++++++++++++ docs/mkdocs.yml | 1 + 2 files changed, 87 insertions(+) create mode 100644 docs/docs/administration/upgrade/0.1.6.md 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..7e63563ecc --- /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. Checkout 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/mkdocs.yml b/docs/mkdocs.yml index fe2b07cc4e..9b9b1a69a5 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 From e906d472b78a0c2928929bbb1fb7383723ac7fa1 Mon Sep 17 00:00:00 2001 From: pavish Date: Fri, 22 Mar 2024 21:08:32 +0530 Subject: [PATCH 06/10] Remove tip mentioning installing specific version since installation steps for each version is different --- docs/docs/installation/build-from-source/index.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/docs/installation/build-from-source/index.md b/docs/docs/installation/build-from-source/index.md index ef10aa57a1..e28efe0bf7 100644 --- a/docs/docs/installation/build-from-source/index.md +++ b/docs/docs/installation/build-from-source/index.md @@ -138,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. ``` From fcdedfd2091922606708039c83347bec9a9bdc93 Mon Sep 17 00:00:00 2001 From: pavish Date: Fri, 22 Mar 2024 21:12:14 +0530 Subject: [PATCH 07/10] Fix instructions in 0.1.4 and 0.1.5 regarding checking out correct tag --- docs/docs/administration/upgrade/0.1.4.md | 3 ++- docs/docs/administration/upgrade/0.1.5.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/docs/administration/upgrade/0.1.4.md b/docs/docs/administration/upgrade/0.1.4.md index 9fd47fd678..41ea19a340 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 the 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 9ad35a7133..fe954cbad8 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](./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), expect you'll have to specify the correct version as 0.1.5 when pulling code from the repository in step 2. You can skip Step 5 – you do not need to change the environment variables. From f72a26c55302ed54c00a61f614f16f23059fc721 Mon Sep 17 00:00:00 2001 From: Kriti Godey Date: Fri, 22 Mar 2024 23:22:16 -0400 Subject: [PATCH 08/10] Minor language fix --- docs/docs/administration/upgrade/0.1.4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/administration/upgrade/0.1.4.md b/docs/docs/administration/upgrade/0.1.4.md index 41ea19a340..04866d4123 100644 --- a/docs/docs/administration/upgrade/0.1.4.md +++ b/docs/docs/administration/upgrade/0.1.4.md @@ -149,7 +149,7 @@ 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 version 0.1.4 from the repository +1. Pull version 0.1.4 from the repository ``` git pull https://github.com/mathesar-foundation/mathesar.git From e99f99ea1577fbccc5707d118d48217710a44050 Mon Sep 17 00:00:00 2001 From: Kriti Godey Date: Fri, 22 Mar 2024 23:23:36 -0400 Subject: [PATCH 09/10] Fixed typo, minor language changes --- docs/docs/administration/upgrade/0.1.5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/administration/upgrade/0.1.5.md b/docs/docs/administration/upgrade/0.1.5.md index fe954cbad8..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](./0.1.4.md#scratch), expect you'll have to specify the correct version as 0.1.5 when pulling code from the repository in step 2. 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. From 614233c85eeac211fda39a6db92a9ee84418450a Mon Sep 17 00:00:00 2001 From: Kriti Godey Date: Fri, 22 Mar 2024 23:26:47 -0400 Subject: [PATCH 10/10] Language change for consistency --- docs/docs/administration/upgrade/0.1.6.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/administration/upgrade/0.1.6.md b/docs/docs/administration/upgrade/0.1.6.md index 7e63563ecc..67a779abe0 100644 --- a/docs/docs/administration/upgrade/0.1.6.md +++ b/docs/docs/administration/upgrade/0.1.6.md @@ -25,7 +25,7 @@ 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. Checkout version 0.1.6 from the repository +1. Pull version 0.1.6 from the repository ``` git pull https://github.com/mathesar-foundation/mathesar.git