1
0

chore: streamline workspace make workflows

Clarify product-level server and desktop commands while moving backend-only maintenance tasks into backend/Makefile. This keeps root automation focused on core flows and aligns the main OpenSpec specs with the new command boundaries.
This commit is contained in:
2026-04-28 17:44:23 +08:00
parent a9972360c2
commit 2c401f7ae6
8 changed files with 411 additions and 266 deletions

View File

@@ -67,11 +67,11 @@
### Requirement: 迁移命令集成
迁移 SHALL 集成到 Makefile
迁移 SHALL 集成到 `backend/Makefile`,而不是根目录 `Makefile`
#### Scenario: 迁移 up 命令
- **WHEN** 执行 `make backend-migrate-up`
- **WHEN** `backend/` 目录执行 `make migrate-up`
- **THEN** SHALL 执行所有待执行的迁移
- **THEN** SHALL 使用 `DB_DRIVER` 变量选择方言目录(默认 `sqlite3`
- **THEN** SHALL 使用 `DB_DSN` 变量作为数据库连接串
@@ -79,20 +79,20 @@
#### Scenario: 迁移 down 命令
- **WHEN** 执行 `make backend-migrate-down`
- **WHEN** `backend/` 目录执行 `make migrate-down`
- **THEN** SHALL 回滚最后一个迁移
- **THEN** SHALL 使用 `DB_DRIVER``DB_DSN` 变量
- **THEN** SHALL 显示回滚进度
#### Scenario: 迁移状态命令
- **WHEN** 执行 `make backend-migrate-status`
- **WHEN** `backend/` 目录执行 `make migrate-status`
- **THEN** SHALL 显示当前迁移状态
- **THEN** SHALL 显示已执行和待执行的迁移
#### Scenario: 创建迁移命令
- **WHEN** 执行 `make backend-migrate-create`
- **WHEN** `backend/` 目录执行 `make migrate-create`
- **THEN** SHALL 同时在 `migrations/sqlite/``migrations/mysql/` 两个目录创建新的迁移文件模板
- **THEN** SHALL 使用递增的版本号