Skip to content

2.1.0

Choose a tag to compare

@Maartz Maartz released this 06 Oct 10:16
· 8 commits to main since this release

Spectro 2.1.0 adds Swift migrations and browsable DocC documentation. This is an additive update from 2.0: existing SpectroKit consumers and SQL migration directories keep their APIs and workflow.

Swift migrations

  • The optional SpectroMigrations product provides a declarative Swift DSL for tables, columns, indexes, references, and checks, with automatic rollback for reversible operations and explicit SQL or irreversible branches.
  • Applications own their migration registry and compiled executable. Preview SQL offline, bundle existing SQL history, and deploy the executable with its resources without shipping SwiftPM or a compiler.
  • spectro migrate init scaffolds the target. Generation, planning, migration, status, and rollback commands forward to the configured project executable and preserve its exit status and signals.
  • Swift and SQL migrations share the same session lock and transactional execution engine. Rollback validates missing and irreversible history before changing the database.
  • PostgreSQL statement splitting now handles quoted identifiers, escape strings, bind parameters, and nested comments correctly.
  • Package discovery stops at the filesystem root, including on macOS, so SQL commands work in directories without a Swift package.

Documentation and CLI

The merged DocC site includes guides and API navigation for Spectro, SpectroMigrations, and SpectroCommon. CLI help now explains setup, configuration, previews, rollback defaults, and deployment with examples.

Validation

All 414 tests passed on macOS and Linux. Release CI also passed copied migration artifact checks on both platforms, deployment in a Linux container without a compiler or source checkout, HTTP application acceptance, and strict DocC validation. CI verification.

Install

.package(url: "https://github.com/Spectro-ORM/Spectro.git", from: "2.1.0")
mint install Spectro-ORM/Spectro@2.1.0
spectro --version

Full changelog · Changes since 2.0.0