mirror of
https://github.com/thecyberlearn/quantum-ai-v2.git
synced 2026-08-18 18:12:58 +00:00
**Smart Database Configuration:** - Auto-detects environment: Railway vs Local development - Tests PostgreSQL connection before using it - Falls back to SQLite if PostgreSQL unavailable - Preserves Railway DATABASE_URL when present **Environment Detection Logic:** 1. Railway: Uses Railway's DATABASE_URL (PostgreSQL) 2. Local with DATABASE_URL: Uses specified database 3. Local with PostgreSQL running: Uses PostgreSQL 4. Local without PostgreSQL: Falls back to SQLite **New Management Command:** - `check_db`: Diagnose database configuration and connection - Shows current engine, connection status, table count - Provides troubleshooting tips for PostgreSQL setup **Solves the Compatibility Problem:** - Local development: Works without PostgreSQL setup (SQLite fallback) - Railway production: Always uses PostgreSQL (via DATABASE_URL) - No more "works locally but fails on Railway" issues - No more "needs PostgreSQL locally to test Railway compatibility" **Benefits:** - Seamless development experience - Production-development parity when PostgreSQL available - Graceful degradation to SQLite when needed - Zero configuration required for basic development 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| backup_users.py | ||
| check_db.py | ||
| create_agent.py | ||
| create_user.py | ||
| fix_migrations.py | ||
| populate_agents.py | ||
| reset_database.py | ||
| test_webhook.py | ||