Skip to content

v1.6.0 ​

Connect through SSH bastions and proxies, and run SQL, JavaScript, TypeScript and MJS migrations with one CLI. This release also adds a documentation website and fixes first-use SSH host trust timing out while saving known_hosts.

Added ​

  • Native SSH tunnels for PostgreSQL, MySQL, MariaDB, MSSQL, Oracle, ClickHouse, TiDB and Redshift, optionally reached through a SOCKS5 or HTTP CONNECT proxy. Connections retain the database's original TLS identity and remote DNS routing.
  • Password, private-key and SSH-agent authentication, environment-based secrets, hidden terminal prompts, and --non-interactive for unattended execution.
  • Interactive first-use host trust showing the SSH address, key algorithm and SHA256 fingerprint. Trust is saved only after explicit approval; changed, revoked or invalid host keys fail without offering approval.
  • The Go OpenConnection API for a migration-owned connection pool and optional SSH transport. Caller-provided database pools retain their existing ownership.
  • A topic-based English and Chinese documentation website covering installation, migration workflows, scripts, the Go API, SSH configuration and troubleshooting.

Changed ​

  • Retire the separate full build mode. SQL, JS, TS and MJS migrations use the same executable and installation command.
  • Publish one binary per platform, using the existing platform filenames without _full assets. SQL and script tests run in one CI build configuration.
  • Remove the build discriminator from capabilities text and JSON output. Supported formats and script dialect metadata remain available.

Fixed ​

  • Keep the SSH handshake timeout paused while an approved host key is saved and rechecked. File-lock waits and filesystem synchronization no longer consume the network handshake budget. Caller cancellation still interrupts lock waits, and the network timeout resumes before SSH authentication.

Upgrade notes ​

  • Update download automation that selects _full assets to use the corresponding platform filename, for example migrate_v1.6.0_linux_x64 or migrate_v1.6.0_windows_x64.exe.
  • Consumers of capabilities must stop reading the removed build field. Use formats, script_dialects and script_dialect_capabilities to inspect support.
  • Existing SQL hashes, script entry-source hashes and migration history remain unchanged. Imported helpers and installed packages remain outside script hashes; retain historical dependency behavior and pin package versions.
  • SSH uses explicit configuration, without OpenSSH configuration, an external ssh process or automatic reconnection. Library secret and host-key prompts require opt-in callbacks; nil callbacks never prompt or approve unknown keys.
  • Script support for TiDB, Redshift, Oracle, ClickHouse and MSSQL remains experimental. Optional external Oracle, Redshift and MSSQL checks require dedicated DSNs; skipped checks do not establish real-instance verification.
  • Existing database transaction limits remain: some DDL implicitly commits, ClickHouse has no automatic transaction rollback, and explicitly nontransactional scripts can leave partial changes after failure.

Install ​

bash
go install github.com/exc-works/migrate/cmd/migrate@v1.6.0
migrate version
migrate capabilities --output json

Prebuilt binaries cover Linux arm64/x64/x86, macOS arm64/amd64, and Windows arm64/x64/x86. Verify downloads against checksums.txt; migration-api.d.ts provides editor declarations. Script execution uses an embedded engine and does not require Node.js or download an interpreter.

中文文档 · English documentation · Runnable examples · Changelog · Changes since v1.5.0