Skip to content

DbShift v2.0.0

Choose a tag to compare

@AzimMahmud AzimMahmud released this 22 Aug 16:57
· 60 commits to main since this release

DbShift v2.0.0

A database-agnostic migration tool for .NET — PostgreSQL, SQL Server, MySQL, and SQLite from one CLI.

Breaking change: dropped net6.0/net8.0 support — DbShift now targets .NET 10 only. This only affects the dotnet tool install --global DbShift path, which needs the .NET 10 SDK/runtime. The self-contained binaries below are unaffected either way — they bundle .NET 10 and need no runtime installed at all.

Installation

Linux / macOS (Homebrew not required):

curl -fsSL https://github.com/AzimMahmud/dbshift/releases/download/v2.0.0/install.sh | bash

Windows (PowerShell):

powershell -c "iwr -Uri https://github.com/AzimMahmud/dbshift/releases/download/v2.0.0/install.ps1 | iex"

Manual: download the archive for your platform below, extract, and put dbshift (dbshift.exe) on your PATH.

Updating

Re-run the same install command above — it overwrites the existing binary in place and won't duplicate the PATH entry. Nothing else needs migrating between versions.

Uninstalling

Both install scripts double as uninstallers — they remove the binary and the PATH entry they added.

# Linux / macOS
UNINSTALL=1 bash -c "$(curl -fsSL https://github.com/AzimMahmud/dbshift/releases/download/v2.0.0/install.sh)"
# Windows — download first; a switch like -Uninstall can't be passed through `iwr | iex`
iwr -Uri https://github.com/AzimMahmud/dbshift/releases/download/v2.0.0/install.ps1 -OutFile install.ps1
.\install.ps1 -Uninstall

Downloads

Platform Package
Windows x64 dbshift-windows-x64.zip
Linux x64 dbshift-linux-x64.tar.gz
Linux arm64 dbshift-linux-arm64.tar.gz
macOS x64 dbshift-macos-x64.tar.gz
macOS arm64 dbshift-macos-arm64.tar.gz

Self-contained .NET 10 single-file binaries — no runtime install required.

macOS: first run may be blocked by Gatekeeper — run xattr -d com.apple.quarantine dbshift (or sudo xattr -rd com.apple.quarantine /usr/local/bin/dbshift).

What's new

Breaking

  • .NET 10 only — dropped net6.0/net8.0 multi-targeting. Building from source, dotnet tool install, and CI now all require the .NET 10 SDK/runtime.

Testing & security

  • 54 real-database integration tests — PostgreSQL, MySQL, and SQL Server now get the same tracker/lock-manager/audit-log coverage SQLite already had, run against live containers via Testcontainers (dotnet test --filter Category=Integration, needs Docker).
  • CodeQL security scanning — automated security-and-quality analysis on every push/PR and weekly on a schedule.

Reliability fixes

  • Lock-loss safety fix — a deploy no longer keeps applying migrations after its distributed lock lease has silently expired and been taken by another process; it now stops immediately and reports the failure instead of risking a concurrent-write race.
  • Deploy crash fix — a non-database fault during a migration no longer crashes the entire deploy; it's now reported as a structured failure like any other error, while genuine cancellation (Ctrl+C) still propagates correctly.

Installer fixes and improvements

  • install.sh now exits 0 on success — a cleanup-trap bug made every install (successful or not) exit with workdir: unbound variable. Anyone scripting around the exit code would have seen every install "fail."
  • install.ps1 now actually prints its status messages — they were silently blank on every run due to an unbound variable reference.
  • New: install.sh --uninstall / install.ps1 -Uninstall — both scripts now remove the binary and clean up the PATH entry they added, idempotently.
  • Quieter startup bannerdbshift new's interactive wizard no longer prints your .NET runtime/OS version on every run.

CI hardening

  • Explicit least-privilege permissions: contents: read added to the build workflow.

Verify

Checksums are in SHA256SUMS.

Changelog

See CHANGELOG.md for the complete, itemized list.