Automatic MySQL schema management with Skeema
summary
Skeema is a CLI that converts a repo of declarative create-table files into safe DDL: it diffs repo vs live MySQL/MariaDB, emits ALTER/CREATE/DROP, and can execute changes using pt-online-schema-change or MySQL 5.6+ online DDL. It supports sharded hosts via service-discovery hooks, per-directory config (timeouts, min-size for OSC), a linter, pull to import out-of-band changes, and validates generated SQL by running it in a temporary shadow schema before pushing. Destructive ops are gated by safety rules.
AI-written summary · about
chapters (33)
- 0:00Intro
- 0:11What is Schema Management?
- 0:49Prior Art
- 2:11Introducing Skeema
- 3:12Location in the MySQL toolchain
- 5:50Manage schemas like code
- 7:49Declarative schema management
- 10:15Repo is CREATE TABLE all the way down
- 10:55Very very agnostic
- 11:39Environments
- 12:36Flexible configuration
- 13:03Configuration examples
- 17:32Dumping schemas to filesystem
- 18:56skeema init: options
- 22:46Updating files from out-of-band changes
- 23:19skeema pull
- 24:15Linting schemas
- 24:31skeema lint
- 26:42Diff-ing schemas
- 29:26skeema diff: use in pipelines
- 30:22Executing DDL
- 32:18Destructive actions and safety checks
- 33:28Shell-outs and variables
- 36:18Online schema change example
- 38:42Service discovery and sharding
- 39:51Service discovery example
- 40:50Sharding behavior
- 42:28Dev: pulling in others' changes
- 43:00Dev: Using Rails / Django / etc
- 43:48Prod: pull request workflow
- 44:52How it works
- 46:32Additional Golang modules
- 47:09Future directions
related talks
37mDatabase Schema Migrations with Zero Downtime
28mSchema-as-Code: Developer platforms and database schema changes
56mSane schema migrations with Alembic and Postgres
57mPatterns of SaaS: Refactoring Databases
33mDatabase Schema Migrations with Zero Downtime
44mDatabase Change Management
52mManaging PostgreSQL changes for the Agile DBA
30mWhat’s New in MariaDB Enterprise Server
