Repository navigation
SQL Yodeler 0.9.0 adds your own column rules and typed columns, on chant 0.124.13.
Added
- Your own column rules (#227). A check in
chant.config.tslint.policiesreads the parsed schema (for example, every table hascreated_at timestamptz NOT NULL, or no Nullable column in a ClickHouse sort key).yodel lintreports a finding in the migration that first breaks it,-- yodel:allowsilences it, andlint.rulessets its level. See docs/lint.md, "Your own column rules". - Typed columns (#228). A table declared with its name as a type argument,
table<"app.events">, gets typed columns from a generatedsrc/sql-types.d.ts(npx chant sql types). A misspelled column then failstsc, andRowOf<"app.events">is the row type. Both templates and both examples now commit the file. See docs/schema.md, "Typed columns". - Docs: what yodel is for, and the ops a schema change implies (ClickHouse rebuilds, Postgres safe renames, backfills), each run once inside its migration. A "Why plain SQL" section in docs/schema.md.
Changed
- chant 0.124.13. The templates and examples pin chant and the sql lexicon at 0.124.13, which typed table tags need.
- A clause chant's parser does not know is kept as written, with a warning naming it, where it used to fail the build (chant#3872). The catalog check and the server decide, and a change to such a clause is planned as one a person reviews.
- The pull request lint job runs
chant sql types --checkwhen the project commitssql-types.d.ts, so a stale file fails the PR. Runyodel cito pick up the step.
Upgrading
- Move
@intentius/sql-yodelerto^0.9.0, and@intentius/chantand@intentius/chant-lexicon-sqlto 0.124.13. - Run
yodel cito re-render the pipelines. - Typed columns are opt-in: add the type argument to a table and run
npx chant sql types. A project withoutsql-types.d.tsgets no new step.
Internal
- The scenario claims are 7 in place of 9 (51 parts in place of 88). They now prove only yodel's own behaviour; the shared review-and-apply layer is chant's and chant proves it.
- CI runs lint, two test shards and the templates as parallel jobs: about 1.5 minutes per pull request in place of 3.7.
- The CI image installs chant at the lockfile's versions.