fix: rename migration to sequential 068, document convention
Renamed fc01_add_pending_task_lane → 068_add_pending_task_lane with revision ID "068" and down_revision "067". Added migration naming convention to CLAUDE.md to prevent future hex-hash migrations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -211,6 +211,10 @@ cd frontend && npm run build
|
|||||||
# Database migrations
|
# Database migrations
|
||||||
cd backend && alembic upgrade head
|
cd backend && alembic upgrade head
|
||||||
alembic revision --autogenerate -m "Description" --rev-id=NNN # NNN = next sequential number
|
alembic revision --autogenerate -m "Description" --rev-id=NNN # NNN = next sequential number
|
||||||
|
# IMPORTANT: Migrations use sequential 3-digit IDs (001, 002, ..., 068, 069).
|
||||||
|
# Check the latest: ls backend/alembic/versions/ | grep -E '^\d{3}_' | sort | tail -1
|
||||||
|
# The revision ID and filename prefix MUST match (e.g., revision="068", file=068_description.py).
|
||||||
|
# down_revision MUST point to the previous sequential number. Never use hex hash IDs for new migrations.
|
||||||
|
|
||||||
# Access PostgreSQL
|
# Access PostgreSQL
|
||||||
docker exec -it patherly_postgres psql -U postgres -d patherly
|
docker exec -it patherly_postgres psql -U postgres -d patherly
|
||||||
@@ -415,7 +419,7 @@ gh run view <id> --json jobs --jq '.jobs[] | {name: .name, conclusion: .conclusi
|
|||||||
- **New endpoint:** Create in `endpoints/` → add to `router.py` → schema in `schemas/` → tests → frontend API client
|
- **New endpoint:** Create in `endpoints/` → add to `router.py` → schema in `schemas/` → tests → frontend API client
|
||||||
- **New page:** Create in `pages/` → add route in `router.tsx` → nav link in `AppLayout.tsx`
|
- **New page:** Create in `pages/` → add route in `router.tsx` → nav link in `AppLayout.tsx`
|
||||||
- **New public route (no auth):** Add at top level in `router.tsx` alongside `/login`, `/register` — NOT inside the `ProtectedRoute`/`AppLayout` children.
|
- **New public route (no auth):** Add at top level in `router.tsx` alongside `/login`, `/register` — NOT inside the `ProtectedRoute`/`AppLayout` children.
|
||||||
- **Schema change:** Update model → `alembic revision --autogenerate -m "desc"` → review → `alembic upgrade head`
|
- **Schema change:** Update model → `alembic revision --autogenerate -m "desc" --rev-id=NNN` (NNN = next sequential number, e.g., 068 → 069) → review → `alembic upgrade head`
|
||||||
- **New frontend API module:** Types in `types/` → export from `types/index.ts` → client in `api/` → export from `api/index.ts`
|
- **New frontend API module:** Types in `types/` → export from `types/index.ts` → client in `api/` → export from `api/index.ts`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
"""add pending_task_lane to ai_sessions
|
"""add pending_task_lane to ai_sessions
|
||||||
|
|
||||||
Revision ID: fc01a1b2c3d4
|
Revision ID: 068
|
||||||
Revises: fb1481317ff6
|
Revises: 067
|
||||||
Create Date: 2026-03-27
|
Create Date: 2026-03-27
|
||||||
"""
|
"""
|
||||||
from alembic import op
|
from alembic import op
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
from sqlalchemy.dialects.postgresql import JSONB
|
from sqlalchemy.dialects.postgresql import JSONB
|
||||||
|
|
||||||
revision = "fc01a1b2c3d4"
|
revision = "068"
|
||||||
down_revision = "067"
|
down_revision = "067"
|
||||||
branch_labels = None
|
branch_labels = None
|
||||||
depends_on = None
|
depends_on = None
|
||||||
Reference in New Issue
Block a user