Skip to content

Commit

Permalink
add instructions for upgrading the database
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Jun 16, 2019
1 parent 8e2f20a commit bbb33f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,18 @@ $ docker run -p 6060:18080 -d --name tinode-srv --network tinode-net \
```
If you set `EXT_CONFIG` all other environment variables except `RESET_DB`, `FCM_SENDER_ID`, `FCM_VAPID_KEY` are ignored.

### Resetting the database
### Resetting or upgrading the database

The database is initialized or re-initialized when either one of the following conditions is true:
The database schema may change from time to time. An error `Invalid database version 101. Expected 103` means the schema has changed and needs to be updated, in this case from version 101 to version 103. You need to either reset or upgrade the database to continue:

* Database is missing.
* Database has a wrong schema version.
* `RESET_DB` environment variable is true.

If you want to reset the data in the database, shut down the Tinode container and remove it:
Shut down the Tinode container and remove it:
```
$ docker stop tinode-srv && docker rm tinode-srv
```
then repeat step 4 adding `--env RESET_DB=true`.
then repeat step 4 adding `--env RESET_DB=true` to reset or `--env UPGRADE_DB=true` to upgrade.

Also, the database is automatically created if missing.


### Enable push notifications

Expand Down
2 changes: 1 addition & 1 deletion py_grpc/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
name="tinode_grpc",
version=git_version,
author="Tinode Authors",
author_email="gene@tinode.co",
author_email="info@tinode.co",
description="Tinode gRPC bindings.",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit bbb33f3

Please sign in to comment.