dev: run sqlx migrations in dev-start

This commit is contained in:
Marco Allegretti 2026-02-01 13:28:01 +01:00
parent 173bea0ac1
commit e42bdfb4aa

View file

@ -72,6 +72,17 @@ for ($i = 0; $i -lt $maxWait; $i++) {
Start-Sleep -Seconds 1 Start-Sleep -Seconds 1
} }
Write-Host "Running database migrations..."
Push-Location (Join-Path $root 'backend')
try {
sqlx migrate run
if ($LASTEXITCODE -ne 0) {
throw "Failed to run database migrations (sqlx migrate run)."
}
} finally {
Pop-Location
}
# Start backend # Start backend
Write-Host "Starting backend..." Write-Host "Starting backend..."
$backend = Start-Process -FilePath 'cmd.exe' ` $backend = Start-Process -FilePath 'cmd.exe' `