开发检查点:完成可信恢复证据与部署回归
补充部署事务恢复证据、锁归属和文件摘要校验,接入站点恢复基线,更新三数据库迁移与回归测试。
This commit is contained in:
1 parent
fb8ddd5002
commit
0e48dc9231
13 files changed
+508
-97
No files matched your search
@@ -19,6 +19,7 @@ import (
|
||||
//go:embed migrations/sqlite/0015_task_idempotency.sql migrations/mysql/0015_task_idempotency.sql migrations/postgres/0015_task_idempotency.sql
|
||||
//go:embed migrations/sqlite/0016_task_deployment_results.sql migrations/mysql/0016_task_deployment_results.sql migrations/postgres/0016_task_deployment_results.sql
|
||||
//go:embed migrations/sqlite/0017_deployment_transactions.sql migrations/mysql/0017_deployment_transactions.sql migrations/postgres/0017_deployment_transactions.sql
|
||||
//go:embed migrations/sqlite/0018_recovery_evidence.sql migrations/mysql/0018_recovery_evidence.sql migrations/postgres/0018_recovery_evidence.sql
|
||||
var migrationFiles embed.FS
|
||||
|
||||
func Migrate(ctx context.Context, db *sql.DB, driver string) error {
|
||||
@@ -43,7 +44,7 @@ func Migrate(ctx context.Context, db *sql.DB, driver string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
const latestMigrationVersion = 17
|
||||
const latestMigrationVersion = 18
|
||||
|
||||
// currentMigrationVersion 在执行业务迁移前拒绝新版数据库及不连续的迁移历史。
|
||||
func currentMigrationVersion(ctx context.Context, db *sql.DB) (int, error) {
|
||||
@@ -229,6 +230,8 @@ func migrationName(version int) string {
|
||||
return "task_deployment_results"
|
||||
case 17:
|
||||
return "deployment_transactions"
|
||||
case 18:
|
||||
return "recovery_evidence"
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE deployment_transactions ADD COLUMN recovery_evidence_json LONGTEXT NULL;
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE deployment_transactions ADD COLUMN recovery_evidence_json TEXT;
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE deployment_transactions ADD COLUMN recovery_evidence_json TEXT;
|
||||
Reference in new issue
Block a user