This maintenance release backports fixes from 0.29.9, including fixes for `withSchema` behavior in certain subqueries and JSON path type inference. The migrator now preserves increasing migration timestamps when the system clock moves backward, and rejects executed migrations with invalid timestamps. A change to the `key()` and `at()` type-argument API is also noted as breaking.
affected
Users of `key()` or `at()` with a second type argument must update those calls, and users with previously out-of-order migration timestamps may need to repair their migration table.
action
Update `key()` and `at()` calls that use a second type argument to use `$castTo<T>()`; repair existing out-of-order migration timestamps as described if applicable.
release_signals
-`key()` and `at()` no longer accept a second type argument to specify the output type; use `$castTo<T>()` instead.
migration_steps1 steps
01If your migration table already contains out-of-order timestamps, run the one-time repair query for your database dialect while no migrations are running. Replace `kysely_migration` with the actual migration table name, including its schema if applicable. Skip this repair when `allowUnorderedMigrations: true` is enabled.
This release fixes migration timestamp ordering when the system clock moves backwards, preventing valid migration histories from being treated as corrupted. It also fixes JSON-path type inference and PostgreSQL/PGlite subquery behavior, and includes a breaking change to the typing API for `key()` and `at()`.
affected
Users relying on the second type argument to `key()` or `at()` must update their code; users with previously out-of-order migration timestamps may need to repair their migration table.
action
Update affected `key()` and `at()` calls to use `$castTo<T>()`, and repair existing out-of-order migration timestamps using the provided query for your database dialect if applicable.
release_signals
-`key()` and `at()` no longer accept a second type argument to specify the output type. Use `$castTo<T>()` to override the output type.
This release introduces new migration transaction modes, a `defineMigration` helper, and support for `mysql2/promise`. It also includes various type-level improvements and a new `stream` method for raw queries.
affected
Users relying on `disableTransactions` or MySQL introspection of system databases will be affected.
action
Update migration configurations to use the new `transactionMode` property and review MySQL introspection results.
release_signals
-Deprecated `disableTransactions`. Use `transactionMode: 'none'` or `transactionMode: 'per-migration'` with `config: { transaction: false }`.
This release introduces a new `transactionMode` property for the `Migrator` class, allowing more granular control over transaction behavior during migrations. It also adds support for `mysql2/promise` and introduces a `defineMigration` helper function for easier migration writing.
affected
Users relying on `disableTransactions` or using `BLOB` columns with SQLite JSON helpers are affected.
action
Update migration configurations to use `transactionMode` instead of `disableTransactions`.
release_signals
-`disableTransactions` is deprecated. Use `transactionMode: 'none'` or `transactionMode: 'per-migration'` with `config: { transaction: false }`.
This release introduces a new `transactionMode` property for the `Migrator` class, allowing more granular control over transaction behavior during migrations. It also deprecates `disableTransactions` in favor of the new `transactionMode` options.
affected
Users relying on `disableTransactions` or using SQLite JSON helpers with `BLOB` columns are affected.
action
Update migration configurations to use the new `transactionMode` property and avoid passing `BLOB` columns to SQLite JSON helpers.
release_signals
-`disableTransactions` is deprecated. Use `transactionMode: 'none'` or `transactionMode: 'per-migration'` with `config: { transaction: false }`.
v0.29.0highbreakingdeprecationfeatureMay 8, 2026
0.29.0
This release introduces several significant features, including `$pickTables` and `$omitTables` for narrowing query scope, a new `ReadonlyKysely<DB>` helper type for compile-time readonly instances, and a new PGlite dialect. Additionally, it adds support for query cancellation and improves type narrowing with `$narrowType`.
affected
Developers using `withTables`, `expression` functions in `create/add index`, or migration exports from the root will need to update their code.
action
Update code to use `$pickTables`, `$omitTables`, `$extendTables`, `column` and `columns` functions, and migration exports from `kysely/migration`.
release_signals
-Deprecated `withTables` in favor of `$pickTables`, `$omitTables`, and `$extendTables`.
-Deprecated `expression` functions in `create/add index` in favor of `column` and `columns` functions.
This release introduces several new features including `$pickTables`, `$omitTables`, and `ReadonlyKysely<DB>` helpers, a new PGlite dialect, and query cancellation support. It also includes deprecations and breaking changes related to TypeScript version requirements and migration exports.
affected
Users relying on deprecated methods or older TypeScript versions will need to update their codebase.
action
Upgrade TypeScript to version 5.4 or higher and replace deprecated methods with new alternatives.
release_signals
-Deprecated `withTables` in favor of `$pickTables`, `$omitTables`, and `$extendTables`.
+
Migration timestamps are now recorded monotonically while holding the migration lock, using the later of the current time and the latest timestamp plus 1 ms.
01If the migration table already contains out-of-order timestamps, run the dialect-specific repair query from the release notes once, while no migrations are running. Replace `kysely_migration` with the actual migration table name, including its schema if configured.
02Skip the timestamp repair if `allowUnorderedMigrations: true` is enabled.