10 lines
392 B
PowerShell
10 lines
392 B
PowerShell
Set-StrictMode -Version Latest
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
$migrationFiles = Get-ChildItem -Path "backend/migrations" -Filter "*.up.sql" | Sort-Object Name
|
|
|
|
foreach ($migration in $migrationFiles) {
|
|
Write-Host "Applying $($migration.Name)..."
|
|
Get-Content -Raw $migration.FullName | docker exec -i rap_postgres psql -U rap_user -d remote_access_platform -v ON_ERROR_STOP=1 -f -
|
|
}
|