Files
JayuCloud/docx/design/build-artifact-and-sql-design.md
T
2026-05-23 21:59:13 +08:00

55 lines
1.2 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.
# 构建产物与 SQL 脚本设计
## Maven 产物目录
Maven 打包产物指定目录为:
```text
artifacts/maven/
```
后续打包 Core 和 Gateway 时,最终可发布的 jar 包统一放到该目录。当前轮次只创建目录和约定,不修改 Java 代码文件。
建议产物命名:
```text
artifacts/maven/YumiNail-Core.jar
artifacts/maven/YumiNail-Gateway.jar
```
如果后续需要 Maven 自动输出到该目录,可以在单独任务中调整 Maven 构建配置或打包脚本。
## SQL 目录
初始化 SQL:
```text
scripts/sql/init/YumiNail.sql
```
后续新增 SQL:
```text
scripts/sql/migrations/
```
迁移脚本命名建议:
```text
YYYYMMDDHHmm_description.sql
```
例如:
```text
202605231030_add_order_review_index.sql
```
## SQL 管理规则
- 空库初始化优先执行 `scripts/sql/init/YumiNail.sql`。
- 上线后新增结构、索引、权限种子和数据修复脚本放入 `scripts/sql/migrations/`。
- 迁移脚本必须可重复审查,避免把环境密码、Nacos 配置或测试库连接信息写入仓库。
- 迁移完成后,必要时同步更新初始化 SQL,保证新环境可以从空库一次初始化成功。