Skeema v1.10.0 released

April 25, 2023

Skeema v1.10.0 is now available! Our latest release adds support for managing seed data in the Premium CLI, as well as several linter enhancements and more.

Seed data

Skeema Premium now supports one of our all-time most-requested features: management of seed data, for populating new tables or spinning up new environments.

The new functionality includes the ability for skeema push to conditionally execute INSERT statements, as well as a mechanism for skeema pull to dump or dynamically update INSERT statements found in your schema repo.

The new inserts option controls how skeema push should interact with INSERT statements that are present in your *.sql files. With the default setting, inserts=seed, INSERT statements will be executed by skeema push only if the target table is empty. This is useful for populating new production tables that immediately need data, or providing fixture data for a dev/CI environment where tables need some initial testing data set.

Meanwhile, skeema pull’s new update-seed-inserts option provides a way to automate creating or updating INSERT statements in your *.sql files. By wrapping conditional dump logic in special “seed views” and then only enabling this option in a designated seed source environment, this feature provides fine-grained control over how, what, and where seed data is selectively dumped from.

Linter enhancements

Skeema v1.10.0 includes two brand new linter checks, as well as additional general improvements to the linter engine.

The new lint-reserved-word linter scans your identifier names (tables, columns, procs, funcs, etc) to see if any conflict with reserved words in any known version of your database server. This functionality protects you against unexpected headaches when it comes time to upgrade your database server version.

Meanwhile the new lint-pk-type linter provides functionality for limiting what column types are permissible in primary keys. The corresponding allow-pk-type option allows you to specify which column types to permit.

The existing lint-has-time linter has been enhanced to describe specific trade-offs of TIMESTAMP vs DATETIME, helping developers to make an informed decision about which type to use in any given situation.

Finally, all linter output has been improved for use in pipelines: whenever STDERR is being redirected/piped, each linter annotation is now guaranteed to only occupy a single log line. This change simplifies automated processing and filtering of linter output.

Additional improvements

Skeema is now regularly tested for compatibility with MariaDB 10.11, the latest LTS server release series of MariaDB.

The SQL file processing logic in Skeema v1.10.0 has been completely rewritten. Users with very large schema repos (hundreds to thousands of CREATE statements, and/or large INSERT statements) will see performance improvements, along with decreased CPU and memory use.

Finally, the output of skeema diff --brief has been improved for readability. Since this option is designed to detect schema drift among a fleet of database hosts, extraneous logging detail is unnecessary, so the logger now omits INFO messages as well as linter annotations.

For more information on Skeema v1.10.0, full release notes are available on GitHub.