Skip to content

Releases: aircodev/miiigrate

miiigrate 0.1.2

Choose a tag to compare

@github-actions github-actions released this 21 Jul 15:04

Robustness release — clean startup under engine-managed boots and docker compose.

  • Auto-run retry: auto: true now retries the startup migration run while the database worker is unavailable (capped exponential backoff, 2-minute budget). Previously the run was attempted exactly once: a boot-order race silently left migrations unapplied until a manual migrate::up.
  • Configuration RPC retry: configuration::register/get retry transient failures (timeout, not connected, function not registered yet) under the same budget instead of crashing the worker after ~16 s; real errors from the configuration worker still fail fast.
  • Clean boot logs: the default tracing filter silences iii-helpers' OTel connection module, which logged every pre-connection attempt at ERROR while iii-sdk already reports the same condition as a WARN retry. Set RUST_LOG to override.

miiigrate 0.1.1

Choose a tag to compare

@github-actions github-actions released this 20 Jul 08:29

Documentation release — no functional change.

  • Agent skill: skills/SKILL.md following the iii skill guidelines, so agents (Claude Code, Cursor, …) know when and how to drive miiigrate. Install with npx skills add aircodev/miiigrate.
  • README rewritten to the iii worker README structure: summary with architecture and lifecycle diagrams, Install, Quickstart, Configuration.
  • Reference documentation moved to docs/: functions, configuration, workflows, codegen mapping, errors and recovery, changelog, roadmap.

miiigrate 0.1.0

Choose a tag to compare

@heryr heryr released this 19 Jul 16:44

Initial release of miiigrate — forward-only SQL migrations for iii, driven entirely through the database worker (no direct database connection), plus TypeScript codegen of your schema.

Highlights

  • migrate::up — each migration runs as one atomic database::transaction batch: pg_advisory_xact_lock serialization on Postgres, BEGIN IMMEDIATE on SQLite. Concurrent migrators (e.g. multiple replicas with auto: true) are detected and counted as skips, not failures. Checksum drift on an applied file blocks the run (CHECKSUM_MISMATCH) before anything is applied.
  • migrate::status — read-only report: applied / pending / mismatched / missing.
  • migrate::create — UTC-timestamped scaffold with a forward-only header.
  • migrate::codegen — Postgres (full: enums, arrays) and SQLite (basic) → TypeScript. Types describe values as they actually cross database::query (JSON): timestamps are RFC 3339 strings, binary is base64.
  • SQL splitter aware of 'strings', E'…' escapes, "identifiers", $tag$…$tag$ dollar quoting, and nested comments.
  • Checksums SHA-256 with CRLF→LF normalization — a Windows line-ending rewrite is not drift.
  • Playgrounds: SQLite end-to-end scenario and a Postgres 16 two-instance concurrency proof (docker compose).

Requires

The database worker (iii worker add database). Postgres and SQLite in v1; MySQL is rejected with UNSUPPORTED_DIALECT.

Install

iii worker add miiigrate

Binaries below cover linux x64/arm64 and macOS arm64/x64 (tar.gz + sha256).