mirror of
https://github.com/yoncodes/BD2PS.git
synced 2026-08-06 06:32:13 +02:00
pushing
This commit is contained in:
14
database/migrations/fix-whitespace.ps1
Normal file
14
database/migrations/fix-whitespace.ps1
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
Reference in New Issue
Block a user