Skip to content

sql: workspace kinds for goose, golang-migrate, clickhouse-migrations and Flyway directories #4400

Closed

Description

@lex00

Part of #3047 (question 6).

Context

#3047 question 6 proposes workspace kinds for existing migration directories, so a team's migrations become a member chant reads without anyone rewriting them: the "check" level of adoption in #3046 question 6.

At 586b71a, lexicons/sql/workspace-kinds.json ships one kind, dbt (#3932). Flyway is read by SQL Yodeler's yodel check, which replays a Flyway project into a server and classifies each migration (sql-yodeler src/check/flyway.ts, sql-yodeler#250), but not as a workspace kind. goose, golang-migrate and clickhouse-migrations have neither.

Kind readers are static: the dbt reader parses files and never runs dbt. Reading a migrations directory's resulting schema means replaying it into a server, which a kind reader does not do. So this is split: the kind finds and lists the migrations, and the schema comes from a replay command.

Change

  1. Kinds in workspace-kinds.json, each with a probe and a static reader that lists the migrations in order and their dialect:
    • goose: .sql files with -- +goose Up and -- +goose Down sections;
    • golang-migrate: <version>_<name>.up.sql and .down.sql pairs;
    • clickhouse-migrations: layout to check against the Node and Python tools ClickHouse lists;
    • flyway: moved from yodel's reader, so yodel check and the workspace share it.
  2. A replay command (or yodel check generalised) that applies a member's migrations to the emulator in order and reads the catalog. The member's outputs are the resulting tables and columns, named per workspace: a sql member exposes its tables and columns as outputs, so a dropped column fails check for its readers #3931, so a dbt member, an app or an otel member can link to them.
  3. On a pull request, each new migration file in such a member is classified (metadata, rewrite, rebuild, lock), and changes nothing else.

Done when

  • Each of the four kinds probes a fixture directory and lists its migrations in order.
  • Replaying a goose and a golang-migrate fixture into the emulator gives outputs a dbt member links to, and a migration that drops a linked column fails chant workspace check.
  • yodel check uses the shared Flyway kind, with its existing tests passing.
  • A new migration file in a pull request is classified in the plan note with no apply.

Activity

  1. added
    enhancement
    area:workspace
    on Oct 23, 2026
  2. lex00 commented on Oct 24, 2026

    @lex00
    ContributorAuthor

    Landed in #4412 (merge 97b03f5) and released in 0.124.48 (0.124.47 was cut but its publish failed on an azure build error fixed in #4414).

    Commits: 72ac129, 01e6488, e87747b, c1aa45b, dcfa812

    Box 1 met (kinds and readers for goose, golang-migrate, clickhouse-migrations, Flyway). Box 2 met in unit tests through chant sql replay; its replay e2e is written and not run. Box 3 met in INTENTIUS/sql-yodeler#280 (yodel check reads Flyway through @intentius/chant/workspace/flyway-layout). Box 4 (classify a new migration file on the pull request) not built: filed as #4407.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workspaceenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions