befly-api 3.20.8 → 3.20.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +15 -0
  2. package/package.json +4 -5
package/README.md CHANGED
@@ -149,6 +149,21 @@ DB_PASS=password
149
149
  DB_NAME=my_database
150
150
  ```
151
151
 
152
+ ### 数据库同步
153
+
154
+ 在 `packages/api` 目录中使用单一命令:
155
+
156
+ ```bash
157
+ bun run db
158
+ ```
159
+
160
+ 该命令固定按以下顺序执行:
161
+
162
+ 1. 先执行数据库差异检查(check)
163
+ 2. 再执行表字段映射同步(apply)
164
+
165
+ 不再区分 `db:check`、`db:apply`,也不需要传任何参数。
166
+
152
167
  ## 📖 文档
153
168
 
154
169
  请优先参考仓库技能文档(`.github/skills/*/SKILL.md`),其中 API/表定义/插件/钩子/菜单/页面/配置/数据库/Redis/日志/运行链路已与当前代码对齐。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "befly-api",
3
- "version": "3.20.8",
4
- "gitHead": "c0876969a14b2d6e66fd5105269e326581c0dde3",
3
+ "version": "3.20.9",
4
+ "gitHead": "558ea1598bb0547b5b068a1c014ea1f4d48939d5",
5
5
  "private": false,
6
6
  "description": "Befly 3.0 API Template",
7
7
  "files": [
@@ -25,11 +25,10 @@
25
25
  "serve": "bunx --bun pm2 start pm2.config.cjs",
26
26
  "dev": "bun run index.js",
27
27
  "test": "bun test",
28
- "db:check": "bun run scripts/syncDb.js",
29
- "db:apply": "bun run scripts/syncDb.js run"
28
+ "db": "bun run scripts/syncDb.js"
30
29
  },
31
30
  "dependencies": {
32
- "befly": "^3.19.8"
31
+ "befly": "^3.19.9"
33
32
  },
34
33
  "engines": {
35
34
  "bun": ">=1.3.0"