fix: SQLite column migration + startup init_schema + missing DB_URL warning
Some checks failed
Build and Deploy MoneyMaker / build-and-deploy (push) Has been cancelled

- db.py: auto-migrate missing columns (signal_correct, pnl_dkk, etc.) on existing SQLite DBs
- db.py: print warning to stderr if DATABASE_URL not set
- dashboard.py: call init_schema() at startup so columns always exist
This commit is contained in:
Henrik Jess Nielsen
2026-05-27 15:04:15 +02:00
parent 1e5e1074e2
commit 4a08016edf
2 changed files with 33 additions and 0 deletions

View File

@@ -769,6 +769,8 @@ def main():
parser.add_argument("--port", type=int, default=int(os.getenv("PORT", 5001)))
parser.add_argument("--host", default=os.getenv("HOST", "0.0.0.0"))
args = parser.parse_args()
from db import init_schema
init_schema()
print(f"\n MoneyMaker Dashboard -> http://localhost:{args.port}\n")
app.run(host=args.host, port=args.port, debug=False)