Skip to content

Commit

Permalink
clarify upgrade instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
mathemancer committed Jan 24, 2025
1 parent f97e87d commit cc3089a
Showing 1 changed file with 62 additions and 3 deletions.
65 changes: 62 additions & 3 deletions docs/docs/releases/0.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -494,26 +494,85 @@ After this, you're ready to proceed with the upgrade.

### For installations using Docker Compose

These instructions are for if you have a Docker compose installation (including one from the guided script).

We will assume you're using our provided`docker-compose.yml` file. If you have heavily modified it, you may need to change some details of the provided commands.

If you have a Docker compose installation (including one from the guided script),
1. With your old version of Mathesar still running, log into your internal database server:

```bash
# This assumes your installation DB role is mathesar
docker exec -it mathesar_db psql -U mathesar -d mathesar_django
```

1. At the `psql` prompt, then run:

```sql
CREATE DATABASE mathesar_temp;
```

1. Log out with `CTRL+D`, and log back into the `mathesar_temp` database:

```bash
docker exec -it mathesar_db psql -U mathesar -d mathesar_temp
```

1. Then run:

```sql
DROP DATABASE mathesar_django;
CREATE DATABASE mathesar_django OWNER mathesar; -- or whichever role you use to run Mathesar
```

1. Log out with `CTRL+D`, and log into your new `mathesar_django` database:

```
docker exec -it mathesar_db psql -U mathesar -d mathesar_django
```

1. Then run:

```sql
DROP DATABASE mathesar_temp;
```

1. Download the newest [docker-compose.yml](https://github.com/mathesar-foundation/mathesar/raw/{{mathesar_version}}/docker-compose.yml) file.

```
wget https://github.com/mathesar-foundation/mathesar/raw/{{mathesar_version}}/docker-compose.yml
```

2. Modify it as per the [installation instructions](../administration/install-via-docker-compose.md), using values from your old `docker-compose.yml` file.
1. Modify it as per the [installation instructions](../administration/install-via-docker-compose.md), using values from your old `docker-compose.yml` file.

3. Run the command below:
1. Run the command below:

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

### For installations done from scratch

For these instructions, you'll need to be familiar enough with your setup to log into your internal Mathesar Database.
1. Log into your `mathesar_django` database, and run:
```sql
CREATE DATABASE mathesar_temp;
```
1. Log out of the database, and log into the `mathesar_temp` database. Then run:
```sql
DROP DATABASE mathesar_django;
CREATE DATABASE mathesar_django OWNER mathesar; -- or whichever role you use to run Mathesar
```
1. Log out of the database, and log into your new `mathesar_django` database. Then run:
```sql
DROP DATABASE mathesar_temp;
```
1. Go to your Mathesar installation directory
```
Expand Down

0 comments on commit cc3089a

Please sign in to comment.