DBMS migration
New in version 0.3.0
Removed in version 0.11.0 (may come back in a future version)
The bridge includes a simple script for migrating between database management systems. It simply reads the data from one database and inserts it into another database.
The script is located in mautrix_telegram/scripts/dbms_migrate. It can be ran using
$ python3 -m mautrix_telegram.scripts.dbms_migrate -f <source db> -t <target db>
Both <source db>
and <target db>
are full database URLs,
e.g. sqlite:///mautrix-telegram.db
and postgres://user:password@localhost/mautrixtelegram
Steps:
- Stop the bridge
- Update the database URI in the config
- Initialize the new database with
alembic upgrade head
- Inside Docker, you need to be in
/opt/mautrix-telegram/
and you need to pass the path to the config withalembic -x config=/data/config.yaml upgrade head
- Inside Docker, you need to be in
- Run the database migration script
- Start the bridge again