fix migrate scripts

This commit is contained in:
Toastie 2025-01-24 18:46:19 +13:00
parent 6d70f28db7
commit df17221c67
Signed by: toastie_t0ast
GPG key ID: 0861BE54AD481DC7
2 changed files with 4 additions and 4 deletions

View file

@ -39,12 +39,12 @@ if ($LASTEXITCODE -ne 0) {
# Step 3: Cleanup migration files
Write-Output "Cleaning up all migration files..."
Get-ChildItem "Migrations/Sqlite" -File | Where-Object { $_.Name -like '*_*.cs' } | ForEach-Object {
Get-ChildItem "Migrations/Sqlite" -File | Where-Object { $_.Name -like '*.cs' } | ForEach-Object {
Write-Output "Deleting: $($_.Name)"
Remove-Item $_.FullName -ErrorAction SilentlyContinue
}
Get-ChildItem "Migrations/Postgresql" -File | Where-Object { $_.Name -like '*_*.cs' } | ForEach-Object {
Get-ChildItem "Migrations/Postgresql" -File | Where-Object { $_.Name -like '*.cs' } | ForEach-Object {
Write-Output "Deleting: $($_.Name)"
Remove-Item $_.FullName -ErrorAction SilentlyContinue
}

View file

@ -55,7 +55,7 @@ for file in "Migrations/Sqlite"/*; do
fi
case "$file" in
*_*.cs)
*.cs)
echo "Deleting: $(basename "$file")"
rm -- "$file"
;;
@ -70,7 +70,7 @@ for file in "Migrations/Postgresql"/*; do
fi
case "$file" in
*_*.cs)
*.cs)
echo "Deleting: $(basename "$file")"
rm -- "$file"
;;