sqlite-web 0.7.2
gitea.db
issue
Create
Query
access
access_token
action
action_artifact
action_run
action_run_index
action_run_job
action_runner
action_runner_token
action_schedule
action_schedule_spec
action_task
action_task_output
action_task_step
action_tasks_version
action_variable
app_state
attachment
auth_token
badge
branch
collaboration
comment
commit_status
commit_status_index
commit_status_summary
commit_sync_log
commit_sync_status
dbfs_data
dbfs_meta
deploy_key
email_address
email_hash
external_login_user
follow
gpg_key
gpg_key_import
hook_task
issue
issue_assignees
issue_content_history
issue_dependency
issue_index
issue_label
issue_pin
issue_user
issue_watch
label
language_stat
lfs_lock
lfs_meta_object
login_source
milestone
mirror
notice
notification
oauth2_application
oauth2_authorization_code
oauth2_grant
org_user
package
package_blob
package_blob_upload
package_cleanup_rule
package_file
package_property
package_version
project
project_board
project_issue
protected_branch
protected_tag
public_key
pull_auto_merge
pull_request
push_mirror
reaction
release
renamed_branch
repo_archiver
repo_hidden_file
repo_indexer_status
repo_license
repo_redirect
repo_topic
repo_transfer
repo_unit
repository
review
review_state
secret
session
sqlite_sequence
star
stopwatch
system_setting
task
team
team_invite
team_repo
team_unit
team_user
topic
tracked_time
two_factor
upload
user
user_badge
user_blocking
user_open_id
user_redirect
user_setting
version
watch
webauthn_credential
webhook
Toggle helper tables
Structure
Content
Query
Insert
Drop
Import
Export
Delete row 871 from issue
id
871
repo_id
83
index
18
poster_id
5
original_author
original_author_id
0
name
feat(personnel): D-13 组织类型字段与宿主 Schema 受控通道(PKG-00
feat(personnel): D-13 组织类型字段与宿主 Schema 受控通道(PKG-006)
...
content
> **叠在 #17 之上(#17 又叠在 #13 之上),请按 #13 → #17 → 本
> **叠在 #17 之上(#17 又叠在 #13 之上),请按 #13 → #17 → 本 PR 的顺序合入。** 本 PR 自身只有最后 2 个提交:`4fa64f1`(D-13)、`6912ab7`(报告回绑)。 ## 背景 - F1 `OrganizationUnitMoved` 要求 `unit_type` 必填(CHG-061 Q5),而 HR 组织原本没有类型字段。 - 02 已于 10-27 定下词表(D73):采用 CHG-061 的三值,02 侧分别映射为 `BUSINESS_UNIT` / `DEPARTMENT` / `TEAM`。 - 加字段要改 D3 冻结的宿主 `schema.prisma`。用户 2026-10-28 裁定 D-13:开受控通道并实现。 ## 内容(对接蓝图 §4.17) - **D3 受控通道**(`scripts/lib/d3-protection.mjs`):`packageUpdates` 只多放行一个文件,即宿主 `apps/api-nestjs/prisma/schema.prisma`。既有迁移、`migration_lock.toml` 和已退役的 Fastify schema 仍不得登记;结构变更一律以新迁移追加。 - **字段**:组织新增可空的 `unitType`(`ORGANIZATION` / `DEPARTMENT` / `TEAM`)。迁移 `20261028090000_organization_unit_type` 只追加这一列;已有组织的值为 null,不做推断。 - **contracts**(台账 PKG-006): - 创建时可选,缺省为 null; - 编辑时省略即保留原值,显式传 null 则清除; - 命令视图与组织摘要必带该字段; - 双时间快照读取该字段,D-13 之前的快照读为 null。 - **服务**:创建和编辑写入该字段,仍沿用原有乐观锁和 outbox;当前读取与双时间读取两条路径都输出该字段。 - **Web**:组织增改表单新增「组织类型」,组织详情显示类型。 - **未做**: - OS 产品副本还没有这一列,登记为 H29。0.19.6 尚未进入 OS main,0.19.7 现在注册不了,等它进入后再随产品版本补上。 - F1 本身:等 contracts 发版后,与 F2–F4 一起实现。 - 已有组织的类型补录:需要业务按实际情况登记。 ## 验证(本地,报告绑定 `4fa64f1`、clean) - `d3-protection` 27/27,新增 2 例;2 个变异探针(去掉放行、放宽到整个 prisma 目录)都判红。 - contracts 232/232,新增 5 例。 - 真实 DB 的 HTTP 测试 3/3,覆盖:带类型 / 不带类型创建;编辑时省略保留、修改、清除;词表外取值返回 400 且不落库;用 `knownAt` 能回看到旧类型。另有 3 个服务层变异探针都判红。 - `check:runtime` 482/482,`check:ui` 46/46(在原有组织增改场景里加入了类型选择和读回),用一次性 PostgreSQL / Redis 跑,跑完已删。 - 静态检查:D3 / schema / migrations / RLS / write-guard 等门禁全部通过;静态链在 O22 处如实停止,`check:governance` 只剩 O22。 - 远端 CI 见本页。 🤖 Generated with [Claude Code](https://claude.com/claude-code)
...
milestone_id
0
priority
0
is_closed
0
is_pull
1
num_comments
0
ref
deadline_unix
0
created_unix
1793194416
updated_unix
1793194416
closed_unix
0
is_locked
0
content_version
0
time_estimate
0
Delete
Cancel