From c07573437908b34bdab3d38f86b942859c988e30 Mon Sep 17 00:00:00 2001 From: chrisnov-it Date: Tue, 19 May 2026 18:08:05 +0800 Subject: [PATCH] Improve README first-run DB init and history-rewrite recovery --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ab9dee9..42d0dab 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,13 @@ on `main`. DB_NAME=bots.db ``` -6. Start the app: +6. Initialize local database schema (first run): + + ```bash + python init_db.py + ``` + +7. Start the app: ```bash python run.py @@ -198,6 +204,17 @@ If dependency installation fails: - Upgrade pip: `python -m pip install --upgrade pip`. - Re-run `pip install -r requirements.txt`. +If you see database errors like `no such table: bots`: + +- Run `python init_db.py` once in the project root. +- Make sure you run `python run.py` from the same project folder. + +If `git pull` shows many conflicts after a forced remote update: + +- Abort merge: `git merge --abort` +- Realign to remote main: + `git fetch origin && git reset --hard origin/main && git clean -fd` + ## Disclaimer Trading foreign exchange, CFDs, crypto CFDs, and other leveraged products