diff --git a/CLAUDE.md b/CLAUDE.md index 61c90c5..7d3afd4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -126,6 +126,7 @@ python manage.py check # System check | `/payroll/payslip//` | `payslip_detail` | Admin: view completed payslip | | `/receipts/create/` | `create_receipt` | Staff: expense receipt with line items | | `/import-data/` | `import_data` | Setup: run import command from browser | +| `/run-migrate/` | `run_migrate` | Setup: run pending DB migrations from browser | ## Frontend Design Conventions - **CSS variables** in `static/css/custom.css` `:root` — always use `var(--name)`: @@ -164,7 +165,7 @@ PROJECT_DESCRIPTION, PROJECT_IMAGE_URL # Flatlogic branding - **Branches**: `ai-dev` = development (Flatlogic AI + Claude Code). `master` = deploy target. - **Workflow**: Push to `ai-dev` → Flatlogic auto-detects → "Pull Latest" → app rebuilds (~5 min) - **Deploy from Git** (Settings): Full rebuild from `master` — use for production -- **Migrations**: Run automatically during Flatlogic rebuild +- **Migrations**: Sometimes run automatically during rebuild, but NOT always reliable. If you get "Unknown column" errors after pulling latest, visit `/run-migrate/` in the browser to apply pending migrations manually. This endpoint runs `python manage.py migrate` on the production MySQL database. - **Never edit `ai-dev` directly on GitHub** — Flatlogic pushes overwrite it - **Gemini gotcha**: Flatlogic's Gemini AI reads `__pycache__/*.pyc` and gets confused. Tell it: "Do NOT read .pyc files. Only work with .py source files." - **Sequential workflow**: Don't edit in Flatlogic and Claude Code at the same time