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
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user