mirror of
https://codeberg.org/likwid/likwid.git
synced 2026-02-09 21:13:09 +00:00
dev: run sqlx migrations in dev-start
This commit is contained in:
parent
173bea0ac1
commit
e42bdfb4aa
1 changed files with 11 additions and 0 deletions
|
|
@ -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' `
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue