feat(M01-B): 建立核心迁移与MySQL连接池

This commit is contained in:
Codex
2026-06-16 21:15:29 +08:00
parent de63164972
commit 8801881f9c
13 changed files with 404 additions and 7 deletions
@@ -4,6 +4,8 @@ $head = (& git rev-parse HEAD).Trim()
$shortHead = (& git rev-parse --short HEAD).Trim()
$backendBuild = if (Test-Path "backend/package.json") { "PROJECT_PRESENT_BUILD_NOT_RUN" } else { "SKIPPED_NO_PROJECT" }
$adminBuild = if (Test-Path "admin/package.json") { "PROJECT_PRESENT_BUILD_NOT_RUN" } else { "SKIPPED_NO_PROJECT" }
$migrationFiles = @(Get-ChildItem -Path "database/migrations" -Filter "*.sql" -File -ErrorAction SilentlyContinue)
$databaseMigration = if ($migrationFiles.Count -gt 0) { "PROJECT_PRESENT_MIGRATION_NOT_RUN" } else { "SKIPPED_NO_MIGRATIONS" }
$rawText = @"
{
@@ -14,7 +16,7 @@ $rawText = @"
"backendBuild": "$backendBuild",
"adminBuild": "$adminBuild",
"miniappMirror": "RECORDED_SOURCE_COMMIT_ONLY",
"databaseMigration": "SKIPPED_NO_MIGRATIONS",
"databaseMigration": "$databaseMigration",
"deployed": false
}
"@
@@ -55,8 +57,8 @@ if ((-not (Test-Path "admin/package.json")) -and $manifest.adminBuild -ne "SKIPP
throw "Dry-run manifest should record missing admin project"
}
if ($manifest.databaseMigration -ne "SKIPPED_NO_MIGRATIONS") {
throw "Dry-run manifest should record skipped migrations until migrations exist"
if ($manifest.databaseMigration -ne $databaseMigration) {
throw "Dry-run manifest databaseMigration mismatch: $($manifest.databaseMigration)"
}
Write-Host "PASS: release manifest dry-run is valid for current HEAD."