From 145b69b25981825cc66104fabbde07b91a7680c9 Mon Sep 17 00:00:00 2001 From: HODLmeTight <35168804+TrezorHannes@users.noreply.github.com> Date: Thu, 2 Jun 2022 08:51:02 +0200 Subject: [PATCH] Adjusted sequencing of the migration script (#651) lnbits needs to run on postgres once before `python3 conv.py` actually works --- docs/guide/installation.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/guide/installation.md b/docs/guide/installation.md index 7184d46b5..b458c3f18 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -49,17 +49,20 @@ You might also need to install additional packages or perform additional setup s ## Important note If you already have LNbits installed and running, on an SQLite database, we **HIGHLY** recommend you migrate to postgres! -There's a script included that can do the migration easy. You should have Postgres already installed and there should be a password for the user, check the guide above. +There's a script included that can do the migration easy. You should have Postgres already installed and there should be a password for the user, check the guide above. Additionally, your lnbits instance should run once on postgres to implement the database schema before the migration works: ```sh # STOP LNbits -# on the LNBits folder, locate and edit 'conv.py' with the relevant credentials -python3 conv.py # add the database connection string to .env 'nano .env' LNBITS_DATABASE_URL= # postgres://:@/ - alter line bellow with your user, password and db name LNBITS_DATABASE_URL="postgres://postgres:postgres@localhost/lnbits" # save and exit + +# START LNbits +# STOP LNbits +# on the LNBits folder, locate and edit 'conv.py' with the relevant credentials +python3 conv.py ``` Hopefully, everything works and get migrated... Launch LNbits again and check if everything is working properly.