Repository navigation
v1.4.0
SQL and standalone JavaScript/TypeScript migrations in one tool.
Added
- Accept
.mjsas a JavaScript migration alias in full builds; SQL-only builds
detect and reject it before migration writes. Supportnew version --format mjs. - Optional
fullbuilds support standalone synchronous JS/TS migrations alongside SQL,
with framework-owned transactions, exact value conversion, source checksums,
execution deadlines and query result limits. capabilitiesreports compiled formats without configuration or a connection.new version --format sql|js|ts|mjscreates 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.0Full SQL/JS/TS/MJS build:
go install -tags=full github.com/exc-works/migrate/cmd/migrate@v1.4.0Release 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.