Skip to content

v1.4.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 12:41
· 166 commits to main since this release
1d52ac5

SQL and standalone JavaScript/TypeScript migrations in one tool.

Added

  • Accept .mjs as a JavaScript migration alias in full builds; SQL-only builds
    detect and reject it before migration writes. Support new version --format mjs.
  • Optional full builds support standalone synchronous JS/TS migrations alongside SQL,
    with framework-owned transactions, exact value conversion, source checksums,
    execution deadlines and query result limits.
  • capabilities reports compiled formats without configuration or a connection.
  • new version --format sql|js|ts|mjs creates migration templates; script timeout and
    result limits can be configured through JSON or the Go facade.
  • Generated JS/MJS templates include JSDoc database types; TS templates provide
    equivalent method, parameter and result declarations for editor assistance.
  • SQL/full CI matrices and real-driver script integration for PostgreSQL, MySQL,
    MariaDB and SQLite; full release binaries and editor API declarations.

Fixed

  • Migration callbacks that panic now roll back instead of entering deferred commit.
  • Execution validates complete selected plans before changing data, including
    irreversible rollback ranges and unsupported script capabilities.

Compatibility

  • Default binaries and existing release filenames remain SQL-only. Existing SQL
    hashes, migration history and version command output remain unchanged.
  • Known JS/TS/MJS migration files are discovered by both builds; SQL-only execution
    refuses them instead of silently skipping required versions.

Install

Default SQL build:

go install github.com/exc-works/migrate/cmd/migrate@v1.4.0

Full SQL/JS/TS/MJS build:

go install -tags=full github.com/exc-works/migrate/cmd/migrate@v1.4.0

Release binaries with _full before the optional .exe suffix support scripts; existing filenames remain SQL-only. No Node.js installation or runtime download is required. Script support covers PostgreSQL, MySQL, MariaDB and SQLite. Verify downloads against checksums.txt.

中文指南 · English guide