Reylo v0.10.0

· v0.10.0 on GitHub

Reylo v0.10.0 shrinks bundled query runtimes by up to 4.6×, runs programmatic migrations directly on your Postgres, MySQL, and SQLite clients without the CLI binary, lints unindexed queries with reylo lint, and adds support for Turso's own engine, Amazon Aurora DSQL, Effect SQL, Postgres 19, migrate.schema, and migrate.exclude.

Several breaking changes from v0.9.0 require updates in existing projects, listed in Upgrading from v0.9.0.

Smaller bundles

Bundled apps now ship only the runtime code, drivers, column readers, and value checks their compiled .sql modules actually use (#551, #642, fixes #543). Measured with esbuild 0.28 across four .run() queries minified into one CommonJS bundle:

DialectBeforeAfterReduction
Postgres (pg)104.7 KB30.0 KB3.5×
MySQL (mysql2)154.2 KB33.3 KB4.6×
SQLite (better-sqlite3)84.5 KB30.8 KB2.7×
ClickHouse (@clickhouse/client)104.1 KB39.5 KB2.6×

Gzipped, the Postgres bundle drops from 37.3 KB to 12.3 KB and the MySQL bundle from 50.0 KB to 12.8 KB. What changed in the output:

  • Installed drivers only: bundler plugins inspect runtime dependencies across the app's package.json, the .sql file's package, workspace dependencies, and the workspace root, bundling only those drivers (Node's preload, Jest, and reylo generate typescript keep every driver).
  • Per-query readers and checks: each compiled module imports only the Postgres column readers, JSON helpers, parameter value checks, and array-dimension checks its statement needs.
  • Opt-in error name maps: errors from .try() carry database codes alone; import postgresErrors, mysqlErrors, or clickhouseErrors from reylo only when you need human-readable error names.

Programmatic migrations on your own client

The migrate() function now runs directly on an app's own Postgres, MySQL, or SQLite client, so production containers no longer need the reylo CLI binary installed (#653, #611, #680, #709, #710).

import postgres from "postgres";
import { migrate } from "reylo";

const sql = postgres(process.env.DATABASE_URL!);
const ran = await migrate(sql); // names of the migrations it ran

What it supports:

  • Postgres and MySQL clients: accepts postgres.js 4+, pg (Pool or Client), and mysql2 (Pool or Connection), running Reylo Migrate's deploy engine compiled to WebAssembly (about 700 KB gzipped, tree-shaken out when migrate isn't imported; Cloudflare Workers and Durable Objects resolve an empty stand-in).
  • SQLite and Turso connections: accepts @tursodatabase/database, its synchronous compat Database, better-sqlite3, node:sqlite, and bun:sqlite, running the same WebAssembly deploy engine with full drift and lock checks, BEGIN IMMEDIATE write locking, and Turso foreign_keys guards (Durable Objects migrate(ctx.storage) keeps its synchronous runner) (#611, #710).
  • Bundled or on-disk files: Reylo's Vite, Rollup, Rolldown, esbuild, Next.js (withReylo on Turbopack and webpack), and webpack/Rspack (rule() from reylo/webpack) adapters bundle migration files into the build; plain Node reads reylo/ (or dir) from the working directory at runtime (#709).
  • Safety and diagnostics: refuses transaction poolers (Neon -pooler hosts, Supabase port 6543) and connections inside an open transaction, and reports broken constraints with the offending-row query just like reylo migrate deploy (#680).

Unindexed query linting

The reylo lint command reports filters and joins that scan every row of a table where a B-tree index could narrow the read (#706).

$ reylo lint q
q/calls_by_status.sql:1:20: Postgres reads every row of calls: no index serves its filter status = :status
  select id, at from calls where status = :status
                     ^^^^^
q/workspace_calls.sql:2:6: Postgres reads every row of workspaces: no index serves its filter name = :workspace
  from workspaces w
       ^^^^^^^^^^

✗ 2 of 4 statements read every row of a table that an index could narrow

What it covers:

  • CLI and CI: reylo lint <paths> [--url <url>] exits 1 on a finding or query diagnostic and 2 when the database can't be reached; reylo analyze also prints findings as warnings on stderr without changing stdout or its exit code.
  • Type check and codegen: findings appear as notes in type-check hovers and reylo generate typescript doc comments without failing the type check.
  • Dialects: checks Postgres (14+), MySQL, and SQLite from query plans without running statements or needing rows in the tables.

Turso's own engine

Reylo now type-checks and migrates local databases built with Turso's own engine (@tursodatabase/database), including full-text indexes, MVCC journals, and Turso-specific SQL functions (#610, #611, #637, #641, closes #513 and #514).

create index docs_fts on docs using fts (title, body);

select id, title, fts_score(title, body, :q) as score
from docs
where fts_match(title, body, :q)
order by score desc

What it covers:

  • Type checking: reads files containing create index … using fts and backing_btree indexes without failing on SQLite's parser, and types Turso built-ins (fts_match, fts_score, fts_highlight, uuid4_str, uuid7_str, time_*, dur_*, and vector functions) whenever @tursodatabase/database is in package.json.
  • Migrations: the reylo migrate and reylo db commands run target and shadow databases through the project's installed @tursodatabase/database whenever a schema, migration, or file uses Turso index methods or an MVCC journal; apps can also migrate in-process via migrate(db).
  • Engine-aware types: with @tursodatabase/database or @tursodatabase/sync installed, uuid4() and uuid7() infer Uint8Array (or unknown alongside @libsql/client, which returns strings), and regexp infers boolean | null.

Amazon Aurora DSQL

Reylo now supports Amazon Aurora DSQL natively as a Postgres platform—including AWS IAM token signing, query type checking, and migrations under DSQL's one-DDL-per-transaction rules (#639, contributed by @ivanbarlog).

.env
DATABASE_URL=postgres://abc123.dsql.us-east-1.on.aws/postgres

For runtime queries, pass a pg pool whose password option signs a fresh token per connection:

import { DsqlSigner } from "@aws-sdk/dsql-signer";
import pg from "pg";
import getUser from "./get_user.sql";

const hostname = "abc123.dsql.us-east-1.on.aws";
const signer = new DsqlSigner({ hostname, region: "us-east-1" });

const db = new pg.Pool({
  host: hostname,
  user: "admin",
  database: "postgres",
  ssl: true,
  password: () => signer.getDbConnectAdminAuthToken(),
});

const user = await getUser.run(db, { id });

What it covers:

  • Automatic IAM login: the reylo CLI signs fresh tokens for *.dsql.*.on.aws URLs over TLS using your AWS environment credentials, AWS_PROFILE, or SSO session.
  • DSQL-aware migrations: reylo migrate new writes one DDL statement per file, places new tables' foreign keys inline, builds indexes with create index async, waits for async index builds during deploy, and manages temporary shadow clusters automatically.
  • Upfront refusals: unsupported schema.sql features (serial, array columns, enums, triggers, plain create index) fail immediately before creating a shadow cluster.

Effect SQL

Queries now run inside Effect SQL through effect(query, params) from reylo/effect, pulling SqlClient from context and joining active transactions inside sql.withTransaction() (#549).

import { Effect } from "effect";
import { SqlClient } from "effect/sql";
import { effect } from "reylo/effect";
import getUser from "./get_user.sql";

const program = Effect.gen(function* () {
  const sql = yield* SqlClient.SqlClient;
  return yield* sql.withTransaction(effect(getUser, { id: 1 }));
});

What it covers:

  • Supported clients: Postgres (@effect/sql-pg), MySQL (@effect/sql-mysql2, cancelling interrupted queries via KILL QUERY), and SQLite (@effect/sql-sqlite-node, @effect/sql-sqlite-bun, @effect/sql-sqlite-do, @effect/sql-d1, @effect/sql-libsql).
  • Errors and defects: database and driver errors fail the Effect with SqlError; refused parameter values and row-count mismatches are defects.
  • Minimum version: requires effect ^4.1.6 (optional peer dependency).

Postgres 19

Reylo now parses Postgres statements with Postgres 19.0's grammar and tracks Postgres 19 publication syntax in Reylo Migrate, while keeping Postgres 14–18 statements unchanged (#554, #567).

insert into kv (k, v) values (:k, :v) on conflict (k) do select returning k, v;
create publication cdc for all tables except (table audit_log), all sequences;

What it covers:

  • New 19 SQL typed: statements using ON CONFLICT … DO SELECT RETURNING infer one row (at_most_one with WHERE), IGNORE NULLS and RESPECT NULLS window clauses parse without breaking bare ignore/respect aliases from Postgres 14–18, and REPACK runs outside migration transactions.
  • Publications in Migrate: publications using FOR ALL SEQUENCES and FOR ALL TABLES EXCEPT (…) are introspected, diffed, and dumped accurately instead of being dropped or misread as published tables.

Schema from a command

Projects can now declare their desired schema in .reylo.yaml under migrate.schema instead of reylo/schema.sql, pulling SQL from a command, multiple files, or inline SQL (#714, closes #572).

.reylo.yaml
migrate:
  schema: $(cat schema/tables.sql schema/generated.sql)
  # or: $(npx drizzle-kit export)

What it covers:

  • Schema commands: every command that reads schema.sql (migrate new, dev, status, lock, deploy --dry-run, history push, and db push) runs the command in memory and checksums its output in reylo.lock; db push --watch re-runs it when non-git-ignored files change.
  • Standalone deploys: reylo migrate deploy and bundled migrations never run the command, while reylo migrate deploy --dry-run in CI does.
  • Strict validation: refuses having reylo/schema.sql alongside migrate.schema, as well as commands that exit non-zero or print nothing.

Excluding objects in migrations

Projects can now exclude custom tool-managed objects from Reylo Migrate in .reylo.yaml using glob patterns (* and ?), alongside expanded built-in exclusions for third-party tools (#654, #612, #598, closes #594).

.reylo.yaml
migrate:
  exclude:
    tables: [public.sync_state, public.etl_*]
    triggers: [public.orders.audit_*]

What it covers:

  • Per-dialect keys: supports schemas, tables, triggers, functions, procedures, publications, and event_triggers on Postgres; tables, triggers, functions, procedures, and events on MySQL; and tables on SQLite.
  • Expanded built-in exclusions: automatically leaves out Cloudflare D1 _cf_* tables, Wrangler d1_migrations, Litestream tables, Hasura hdb_catalog, AWS DMS and Qlik tables, Bucardo, Slony, Zero, Neon neon_migration, PlanetScale/Vitess _vt_* tables, gh-ost tables, and leftover pt-osc/LHM triggers.
  • Dependency checks: reylo migrate init refuses when a project object (such as a view, foreign key, function, or publication) depends on an excluded object, naming each one.

Faster postgres.js 4.2 decoding

On postgres 4.2 and later, Reylo now reads rows through per-query .parsers() and .transform(false) instead of .raw(), cutting decoding overhead and enabling clients configured with transform.row (#658). Measured overhead over postgres.js defaults (16 columns, Node 24, postgres 4.2.0, idle 8-vCPU Linux VM, three runs):

RowsBeforeAfter
10,000+101% to +102%+20% to +21%
100+49% to +65%+6% to +11%
1+18% to +21%+13% to +19%

What else changed on postgres 4.2+:

  • Row transforms supported: clients configured with transform.row now run compiled queries instead of being refused.
  • Declared names preserved: the transform.column option no longer renames declared columns on compiled queries, including after a select * migration or inside transactions.

Upgrading from v0.9.0

These are the major breaking changes most upgrading projects can hit. Smaller typing refinements, edge-case refusals, and dialect fixes are listed in All changes.

Every dialect

  • Files written by an earlier reylo generate typescript are refused at runtime until regenerated. Run reylo generate typescript again after upgrading. Modules produced by bundler plugins rebuild automatically (#551, #587, #642).
  • Errors from .try() no longer carry condition on Postgres or code on MySQL and ClickHouse. Compare error.code on Postgres ("23505"), error.errno on MySQL (1062, which still narrows error.key), or error.number on ClickHouse, and look up names with postgresErrors, mysqlErrors, or clickhouseErrors from reylo (#642).
  • Queries no longer carry input or output JSON Schemas. The query.inputSchema, query.outputSchema, query["~standard"].jsonSchema, query["~reylo"].json, AsJson, and defineQuery's jsonSchema option are removed; remove references to them. JSON Schema CHECK constraints and typed JSON parameters (:p::jsonb('…')) are unchanged (#587).
  • Bundled queries refuse drivers not listed in the app's dependencies. Add your database driver package to the app's package.json or a workspace package it depends on (#551).
  • Some key lookups now infer Row | null instead of Row[]. Queries matching a unique key via in (subquery) or = (subquery), Postgres queries matching a composite key via row-value comparison ((a, b) = (:a, :b)), and MySQL queries qualifying a table with the connection's own database now return a single row or null; the type checker points at every caller reading [0] or iterating (#589, #694, #724).
  • Windows $(…) commands in .reylo.yaml now run in a built-in sh-syntax shell instead of cmd. Rewrite any Windows direct_url command that uses cmd syntax (%VAR%, type) to sh syntax ($VAR, cat); plain executables such as op read … work unchanged, and macOS and Linux keep sh -c (#714).

Postgres

  • Connections are read from DATABASE_URL or direct_url alone, without libpq PG* environment variables. Environment variables (PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE, PGOPTIONS, and PGSSL*) no longer fill in missing URL parts, and an incomplete URL with PGHOST, PGPORT, PGUSER, PGDATABASE, or PGOPTIONS set is refused before connecting. Interpolate those variables into direct_url in .reylo.yaml instead (#648):

    .reylo.yaml
    direct_url: postgres:///?host=${PGHOST}&user=${PGUSER}&password=${PGPASSWORD}&dbname=${PGDATABASE}

SQLite

  • The type check now prepares queries against node:sqlite, sql.js, and @sqlite.org/sqlite-wasm (defaulting to node:sqlite when package.json lists no SQLite driver outside Bun). Statements calling functions missing from that engine (or custom functions registered via db.function()) now fail type-checking; if your driver comes through an unrecognized wrapper package, list the driver in package.json (#705, closes #681).

Reylo Migrate

  • The first reylo migrate status and reylo migrate deploy after upgrading print "This database can't be compared here with what its last migration left". The catalog reader version bumped; run reylo migrate deploy --dry-run to inspect, and the next deploy writes a new fingerprint (#567, #654).
  • On MySQL, shadow replays now refuse cross-database writes and unparseable statements naming another database. Set shadow_url to a separate MySQL server, or re-baseline from the database with reylo migrate init and reylo migrate history push --url <db> (#693).
  • On Postgres, reylo migrate new now refuses column type changes between types with no Postgres cast until --drop <table>.<column> names the column. Previously it wrote using <col>::text::<new type> silently, which could corrupt rows or fail at deploy; enum-to-enum changes still convert by label (#707, closes #689).

All changes

Every substantive change since v0.9.0, grouped by area.

Core and runtime

  • Bundle only the drivers, column readers, parameter checks, and error maps each compiled query uses, cutting bundle size up to 4.6× (#551, #642, fixes #543).
  • Add reylo/effect to run typed queries inside Effect SQL on the context's SqlClient (#549).
  • Remove query inputSchema, outputSchema, ~standard.jsonSchema, and AsJson (#587).
  • Infer one or at_most_one cardinality for subquery key matches, SQLite INSERT … SELECT … RETURNING and UPDATE … FROM … RETURNING, and SELECT without FROM, while stopping volatile calls in derived tables, CTEs, or views from pinning keys (#589).
  • Reject duplicate field names in row values and built JSON objects with reylo14, drop key inference across INTERSECT/EXCEPT, and simplify inference rules across Postgres, MySQL, and SQLite (#646, #628, #632).
  • Refuse ::rows(…) and ::row(…) member names containing \ or " on MySQL and SQLite, or exceeding 63 UTF-8 bytes on Postgres (#675).
  • Keep 64-bit integers exact in built JSON (throwing DecodeError past 2^53 − 1) and accept bigint for integer fields in typed JSON parameters (#553).
  • Preserve NaN, ±Infinity, and -0 across scalar and JSON parameter paths, refusing non-finite numbers where a dialect or column type cannot hold them (#558).
  • Preserve NaN, ±Infinity, and -0 inside structured ::row() / ::rows() parameters (#530 by @smorimoto).
  • Check JSON Schema multipleOf by exact decimal division instead of floating-point remainder (#531 by @smorimoto).
  • Move schema fingerprinting into the engine over every catalog fact it reads (#562).
  • Key reylo/.cache/ entries by URL parameters that select a database (#525 by @smorimoto).
  • Write newly analyzed cache entries under the post-analysis fingerprint rather than a cached pre-migration one (#527, fixes #522).
  • Stop caching cancelled describes and transient server errors as statement diagnostics (#507 by @smorimoto, #561).
  • Unify placeholder, quote, and comment scanning behind one per-dialect lexical table (#566).
  • Memoize nested statement cardinality checks in their parent scope, fixing nested WITH scoping and speeding up deeply nested queries (#563).
  • Resolve shadowed function and WITH names as the database server does (#565).
  • Bound and speed up deeply chained WITH queries without overflowing the stack (#583 by @smorimoto).
  • Validate bound ordering and enum values inside type descriptor checks (#593 by @smorimoto).
  • Read git-ignored directories when named directly or matched by a quoted glob in reylo analyze and reylo generate typescript, and list skipped git-ignored .sql files when a directory search finds nothing else (#703, closes #682).
  • Add reylo lint (plus reylo analyze stderr warnings and type-check notes) to report filters and joins that scan every row of a table where a B-tree index could narrow the read (#706).
  • Infer required (non-null) parameter types when writing to columns that feed NOT NULL generated columns—including through CASE expressions whose results are all NULL when the column is NULL—and extend that CASE rule to WHERE-implied non-nullability (#695, #723).

Postgres

  • Add native Amazon Aurora DSQL support for IAM login signing, query type checking, and migrations (#639 by @ivanbarlog).
  • Parse statements with Postgres 19.0's grammar, supporting ON CONFLICT … DO SELECT RETURNING, IGNORE/RESPECT NULLS, and REPACK (#554).
  • Read postgres.js 4.2+ rows through per-query .parsers() and .transform(false), cutting 10,000-row overhead from +101% to +20% and enabling transform.row clients (#658).
  • Report Postgres columns whose built-in type changed since the query was built via a REYLO_COLUMN_RETYPED warning and changed on reylo:query trace events, using result OIDs with zero extra queries (#704, closes #685).
  • Pair Postgres result fields with declared columns by name when column order differs from the build (such as select * after schema changes), decode row values and composite types in the live database's field order, and stop caching declared user-type kinds by OID across the client (#708, #715).
  • Pipeline Postgres catalog reads from ~55 round trips down to 2 (cutting reylo migrate history push on a 44-migration Postgres 17 project at 60 ms RTT from 176 s to 43 s on init.sql and 446 s to 99 s on refusal) and scope extension relations in capabilities to extensions the statement actually uses (#711).
  • Tighten Postgres nullability and cardinality inference for casts over COALESCE of aggregates and scalar subqueries, RETURNING on UPDATE/DELETE/INSERT/MERGE with LEFT JOIN or UNION ALL in FROM (typing RETURNING columns nullable under DO INSTEAD rules), long UNION ALL queries over CTEs, and row-value comparisons against composite keys (#724).
  • Read Postgres connections from DATABASE_URL or direct_url alone, ignoring libpq PG* environment variables and refusing incomplete URLs when they are set (#648).
  • Enforce declared array dimensions inside composite row fields and keep json[]/jsonb[] one-dimensional (#590).
  • Serialize nested array parameters at the depth .run() reads and fix macaddr/bit domains in ::rows() (#556).
  • Type arrays of bit, varbit, vector, halfvec, sparsevec, lseg, and polygon as NestedArray under allow_nested_arrays: true (#528 by @smorimoto).
  • Decode arrays of a domain over an array type instead of returning nulls (#544).
  • Preserve -0 on float parameters across Postgres drivers (#529 by @smorimoto).
  • Store Uint8Array values for domains over bytea as bytes rather than comma-joined text on PGlite (#517, fixes #512).
  • Refuse pg clients configured with binary: true before executing the query (#660).
  • Read non-ASCII identifiers and dollar-quote tags and end -- comments at bare carriage returns (#508 and #509 by @smorimoto).
  • Parse colons using Postgres's grammar so json_object(k :v) and array slices no longer invent placeholders (#627, #636, closes #625).
  • Read unique expression indexes, collations, and NOT ENFORCED checks from the catalog instead of text matching, preserving domain-cast expression keys (#650, #678).
  • Audit trusted built-in overloads and type casts from timestamp/timestamptz to time/timetz as nullable (#656).
  • Type path + path as nullable (#630, closes #621).
  • Type values converted through a user CREATE CAST … AS IMPLICIT function as nullable (#635, closes #619).
  • Mark array_agg(DISTINCT …), json_agg(DISTINCT …), and jsonb_agg(DISTINCT …) as distinct (#634).
  • Include aggregate support functions in schema fingerprints (#524 by @smorimoto).
  • Stop duplicating CTE names in nested scopes and reuse exact row counts when bounding subqueries (#537 and #540 by @smorimoto).
  • Report missing schema USAGE permissions as a statement diagnostic instead of an internal catalog error (#591).

MySQL

  • Pipeline MySQL catalog reads down to 3 network round trips regardless of table or view count, speeding up remote schema reads and reylo migrate history push while falling back per statement on proxies that refuse multi-statement queries (#719).
  • Type tables, columns, and wildcards qualified with the connection's own database as bare names, restoring key cardinality and parameter types (#694).
  • Keep ENUM and SET labels when reading through schema-qualified tables (#671).
  • Run JSON_TABLE columns as written without injecting the database's collation, refusing comparisons, sorts, or groups on uncollated text columns until a collation is named (#647).
  • Stop silently turning out-of-charset characters into ? in ::rows() on non-utf8mb4 databases and compare ::rows() insert text in the database's collation (#674, #690).
  • Bind parameters through execute() on mariadb 3 and guard text-escaped values on mariadb 2 and Hyperdrive against session charset and sql_mode mismatches (#568 by @smorimoto).
  • Stop routing parameterless mariadb statements to query() based on words like warnings or errors in the SQL or filename (#669).
  • Turn off decimalNumbers per query on mysql2 3.25+ and keep full fractional digits on temporal columns (#659).
  • Derive .readOnly and .try() error narrowing from the parse tree, keeping value-error error.column as string | undefined (#651, #602).
  • Treat derived-table, CTE, and view columns calling stored functions as varying so they don't falsely pin keys (#597).
  • Keep table, derived-table, and WITH names that differ only in case separate on case-sensitive servers (#570 by @smorimoto).
  • Resolve casts using the session's sql_mode, fixing false rewrites under NO_BACKSLASH_ESCAPES (#662).
  • Report Vitess parse errors as statement diagnostics (#663).
  • Include every readable database and stored function signature in the MySQL schema fingerprint (#546, fixes #538).
  • Drop declared string lengths on utf16 and utf32 columns inside JSON documents (#576 by @smorimoto).
  • Refuse parameters beside a bare NULL (such as COALESCE(:p1, NULL, 1)) whose prepared type flips between binary and text until explicitly cast (#695).

SQLite and Turso

  • Type databases built with Turso's own engine (@tursodatabase/database), including USING fts indexes and Turso built-in functions (#610, closes #514).
  • Accept Drizzle connections over every supported SQLite driver (including drizzle-orm/node-sqlite and @tursodatabase/database) and refuse @tursodatabase/serverless with a TypeError (#672, closes #666).
  • Prepare queries against node:sqlite (default when no SQLite driver is listed outside Bun), sql.js, @sqlite.org/sqlite-wasm, and recognized wrapper packages during type-checking, watching package.json for driver changes (#705, closes #681).
  • Pass -0 and ±Infinity directly to SQLite drivers instead of rewriting query text, refusing ±Infinity on Cloudflare D1 before sending (#673).
  • Prevent integers past 2^53 from returning rounded on untyped columns and integer-or-real expressions like ceil, floor, and trunc, and type overflowing integer arithmetic (+, -, *, /, unary minus) as integer-or-REAL (#575 fixes #539, #697).
  • Type unixepoch('subsec') and related sub-second date/time calls as REAL (#626, closes #620).
  • Derive NULL-strictness from one measured table covering every SQLite built-in (#555).
  • Stop treating replace()'s third argument as rejecting NULL in WHERE, and end block comments at the first */ (#502 and #510 by @smorimoto).
  • Read SQLite triggers, virtual-table modules, and pragmas directly from SQLite's parser (#652).
  • Memoize subquery cardinality checks so deeply nested derived tables no longer take exponential time (#547, fixes #541).
  • Find Cloudflare D1 bindings by name past Worker service bindings in Wrangler configs (#596, fixes #595).

ClickHouse (preview)

  • Type Variant columns as the full union of their member types, including arrays, tuples, maps, and enum labels (#578 by @smorimoto).
  • Quote tuple member names and enum labels as ClickHouse writes them (#573 by @smorimoto).
  • Read SETTINGS, un-AS column aliases, and parameters from ClickHouse's query tree, fixing false refusals on cast_keep_nullable = 0 and refusing SETTINGS limit/offset overrides (#649).
  • Prevent stale analyses from lagging replicas behind a load balancer from entering reylo/.cache/ (#592).
  • Type scalar subqueries inside ClickHouse branches that a parameter value can fold away as nullable (reading EXPLAIN QUERY TREE run_passes = 0) and stop inferring exactly-one-row cardinality for ungrouped aggregates inside constant-foldable if/multiIf/CASE/AND/OR/coalesce branches (#723).

Reylo Migrate

  • Run migrate(client) on an app's own postgres.js, pg, mysql2, SQLite, or Turso connection through the WebAssembly deploy engine without the reylo binary, with CLI-parity drift checks, BEGIN IMMEDIATE SQLite locking, and broken-constraint diagnostics (#653, #611, #680, #710).
  • Bundle migration files at build time for Next.js (withReylo on Turbopack and webpack) and webpack/Rspack via rule() from reylo/webpack (#709).
  • Run reylo migrate and reylo db on Turso files with full-text/vector indexes or MVCC journals through @tursodatabase/database (#637, #641, refs #513).
  • Add migrate.schema in .reylo.yaml to declare a project's desired schema from a command, multiple files, or inline SQL, and run .reylo.yaml $(…) commands on Windows in a built-in sh-syntax shell instead of cmd (#714, closes #572).
  • Add migrate.exclude in .reylo.yaml to exclude custom tool-managed objects by glob pattern, and point drift refusals on unmanaged objects toward migrate.exclude (#654, #702, refs #594).
  • Automatically exclude tool-managed objects from Cloudflare D1, Wrangler, Litestream, Hasura, AWS DMS, Qlik, Bucardo, Slony, Zero, Neon, PlanetScale/Vitess, gh-ost, pt-osc, and LHM (#598, #612, closes #594).
  • Warn and run nothing instead of failing when deploying older code against a database or Durable Object that has already applied every migration in the project plus newer ones (as after a rollback), replaying those newer migrations from history in deploy --dry-run -- <build> shadows while continuing to refuse edited migrations or split histories (#713).
  • Prepend a lock-free DO $$ row pre-check before split Postgres CHECK and SET NOT NULL migrations by default (migrate.strict_checks: true, overridable with --no-strict-checks or --strict-checks), rolling back cleanly with the offending-row query on violating rows, and print a backfill-ordering note when strict checks are skipped or disabled (#712, #698).
  • Refuse Postgres column type changes between types with no Postgres cast in reylo migrate new until --drop names the column (instead of emitting an unflagged ::text:: cast), resolve extension casts directly, refuse timetz → time offset loss, and convert domain columns through their base type (#707, closes #689).
  • Run ANALYZE <table> (<columns>) on Postgres after migrations that retype, re-collate, or rewrite columns, refreshing planner statistics without blocking reads or writes (#718).
  • Keep MySQL shadow replays inside their shadow database (refusing cross-database writes and unparseable statements naming another database) and harden Postgres lock-check quoting (#693).
  • Introspect, diff, and dump Postgres 19 FOR ALL SEQUENCES and FOR ALL TABLES EXCEPT (…) publications (#567).
  • Continue checking remaining constraints in reylo migrate deploy --dry-run after a pending data change (#545).
  • Treat only ASCII whitespace as spacing in lock checksums (#523, closes #518).
  • Match multi-line string line endings consistently between reylo.lock and status/deploy (#532 by @smorimoto).
  • Detect longer Jujutsu (jj) and custom-width git merge conflict markers across migration and lock checks, naming jj commands beside git in conflict messages (#716).
  • Write explicit schema.sql grants for Supabase roles even when local default privileges imply them (#511).
  • Copy Supabase platform schemas into shadows without pg_dump and ignore Supabase-managed extension grants (#521, #609).
  • Allow shadow databases to create pg_cron (#579, closes #542).
  • Pin __reylo_migrations to one schema regardless of search_path (#559).
  • Drop only the specific invalid index left by an interrupted Postgres concurrent index build (#608).
  • Create user-defined Postgres casts before objects that depend on them and refuse stale cast removals (#686).
  • Safely drop and re-add MySQL foreign keys around AUTO_INCREMENT and collation changes without leaving partial state (#584 by @smorimoto, #601).
  • Read MySQL view bodies via SHOW CREATE VIEW so comma-joined JSON_TABLE views compare cleanly (#586).
  • Refuse to auto-rerun a MySQL migration interrupted between DDL commit and history recording (#614, closes #535).
  • Report what MySQL changes under LOCK TABLES block (including standalone CREATE INDEX and DROP INDEX), warn on MyISAM key rebuilds, and require --blocking when enforcing a CHECK under LOCK TABLES (#665, #668, #677, #692).
  • Try MySQL ALTER TABLE changes with ALGORITHM=INPLACE as well as INSTANT and track table checks, table options, and old_alter_table on the lock-check copy, stopping reylo migrate new from refusing in-place changes under LOCK TABLES (lengthening a VARCHAR within its length bytes, changing an unindexed column's collation, making an index invisible, and updating column or table comments) (#725).
  • Group and order SQLite table rebuilds by target foreign-key references so cyclical and multi-table rebuilds preserve rows and changes with foreign keys enabled (#585 by @smorimoto, #603, #645).
  • Preserve structured error kinds and codes across host and migration errors, including translated Postgres messages (#644).

Contributors

Thanks to everyone outside the core repository who contributed code or filed reports that shipped in v0.10.0.

Pull requests:

  • @ivanbarlog — native Amazon Aurora DSQL support (#639).
  • @smorimoto — 31 shipped pull requests across Postgres, MySQL, SQLite, ClickHouse, and Reylo Migrate, plus 15 bug reports resolved in this release.
  • @X6TXY — Postgres 14 and 15 compatibility fix in the dynamic filtering docs example (#684).

Issue reports:

  • @wilau2 — bundle size reduction (#543).
  • @cr101 — Turso's own engine in the type check and Migrate (#513, #514), Drizzle over node:sqlite (#666), node:sqlite driver checking (#681), and git-ignored .sql directory handling (#682).
  • @franciscohermida — D1 table exclusions, migrate.exclude, and Wrangler service bindings (#594, #595).
  • @bduff9 — pg_cron in shadow databases (#542).
  • @X6TXY — Postgres runtime column-retype warnings (#685).
  • @jgburet — schema from multiple files or a command via migrate.schema (#572).
  • @aniravi24 — Postgres type changes with no cast in reylo migrate new (#689).

Full Changelog: v0.9.0...v0.10.0

Released under the MIT License. Copyright © 2026 Colin McDonnell.

On this page

reylosql/reylo