docs: record advanced module contracts and isolated Linux acceptance

This commit is contained in:
2026-09-23 14:58:48 +08:00
parent 208a9c3fbd
commit 04a1f7999d
6 changed files with 486 additions and 1 deletions

View File

@@ -72,3 +72,20 @@ python3 scripts/verifyDatabase.py --cli /tmp/go-omni --framework-dir .
```
数据库验收需要本地 Docker,使用独立 MySQL 8.4 容器;不会连接已有业务数据库,结束后清理测试容器与数据卷。
## 显式迁移(main)
SQL 命名为 `0001_createUsers.up.sql`。先预览版本和 SHA-256 清单:
```sh
go-omni migrate --dir migrations
```
部署步骤配置 `GO_OMNI_DB_DSN`,显式执行:
```sh
go-omni migrate --dir migrations --apply
```
预览不连接数据库;应用启动不自动迁移。失败保留 dirty 状态,不提供自动 down/force。
脚手架原有 `schema.sql` 不会自动变成有版本的迁移,已有库需要先确定基线。详见 [扩展模块](../../ADVANCED.md)。