oh-my-muse/docs/memorys/2026-06-28-mini部署迁移.md
lili 3ead87206a
Some checks failed
Backend Maven CI / backend-local (push) Has been cancelled
fix(deploy): 固定mini后端迁移目录
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 08:27:22 -07:00

17 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# mini-desktop 部署迁移注意
## 结论
mini-desktop 的 `muse-server` 运行包只包含 jar 不够。后端 Flyway 配置包含 `filesystem:sql/muse`,部署时必须同步 `muse-cloud/sql/muse/``/opt/muse-rc1/sql/muse/`,否则新增迁移不会被远端扫描到。
## 证据
- 2026-06-28 部署完整导入向导后,后端首次启动成功,但日志显示 `Current version of schema "public": 33``Skipping filesystem location: sql/muse (not found)`V34 未执行。
- 补传 `/opt/muse-rc1/sql/muse/V34__create_ai_import_parse_tables.sql` 并固定启动工作目录后,重启日志显示 `Migrating schema "public" to version "34 - create ai import parse tables"`,随后 `Successfully applied 1 migration ... now at version v34`
## 规则
- 部署包应包含:`backend/muse-server.jar``studio/dist``admin/dist``bin/*``sql/muse/*`
- `scripts/deploy/mini-desktop/start-backend.sh` 必须在启动 Java 前 `cd "${ROOT}"`,确保相对路径 `filesystem:sql/muse` 指向部署目录。
- smoke 不能只看端口和 401/200还要 grep Flyway 日志,确认目标迁移版本已应用。