diff --git a/.doc/ops/short-term/2026-09-22-freeform-project-id-bigint.md b/.doc/ops/short-term/2026-09-22-freeform-project-id-bigint.md new file mode 100644 index 00000000..9ee47c41 --- /dev/null +++ b/.doc/ops/short-term/2026-09-22-freeform-project-id-bigint.md @@ -0,0 +1,27 @@ +--- +title: "freeform project_id BIGINT 对齐 projects.id" +task_id: "freeform-project-id-bigint-2026-09-22" +status: done +created: 2026-09-22 +owner: Cursor +task_type: implementation +branch: feature/freeform-project-id-bigint-2026-09-22 +worktree: .worktrees/freeform-project-id-bigint-2026-09-22 +write_scope: ["deploy/postgres/goose", "internal/freedoc", "internal/server", ".doc"] +allowed_environments: ["dev"] +mutex: "deploy/postgres/goose + freeform" +--- + +# freeform project_id BIGINT + +## 问题 +`POST /api/v1/freeform-documents` 在雪花 `project_id`(>int4 max)时 pgx 编码失败(OID 23),阻塞 UI-11 附件注册。 + +## 修复 +- goose `00063`:`freeform_documents.project_id` → BIGINT +- Go `ProjectID`/`ListDocuments` → int64;list query 用 `ParseInt` +- 活库已手工 ALTER(schema 仍报 61);合入后 goose 幂等加固 + +## 验证 +- `go test ./internal/freedoc/ -short` PASS(含 snowflake 回归) +- 活库 column = bigint