Files
BD2PS/database/migrations/fix-whitespace.ps1
yoncodes e58fd190b4 pushing
2025-10-28 21:21:28 -04:00

14 lines
474 B
PowerShell

Get-ChildItem -Filter *.sql | ForEach-Object {
$content = Get-Content $_.FullName -Raw
$original = $content
# Remove trailing commas before closing parenthesis
$content = $content -replace ',(\s*)\)', '$1)'
if ($content -ne $original) {
Set-Content -Path $_.FullName -Value $content -NoNewline
Write-Host "Fixed: $($_.Name)" -ForegroundColor Green
}
}
Write-Host "`nDone! All trailing commas removed." -ForegroundColor Cyan