From e42bdfb4aa1d018ee049e76172457e6c3b075ab3 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Sun, 1 Feb 2026 13:28:01 +0100 Subject: [PATCH] dev: run sqlx migrations in dev-start --- scripts/dev-start.ps1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/dev-start.ps1 b/scripts/dev-start.ps1 index f00c475..d3b17e5 100644 --- a/scripts/dev-start.ps1 +++ b/scripts/dev-start.ps1 @@ -72,6 +72,17 @@ for ($i = 0; $i -lt $maxWait; $i++) { 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 Write-Host "Starting backend..." $backend = Start-Process -FilePath 'cmd.exe' `