SendGrid’s Data Operations team recently rearchitected their MySQL schema change process. Their goal: safely empower the company’s individual engineering teams to manage their own schema changes, without requiring DBA intervention. Skeema is a key component of their new design.
Skeema’s command-line client is currently a stateless tool, typically run manually as needed. Some companies are starting to use it in an automated fashion, as part of a CI/CD pipeline, but this can be complex to configure. Fortunately, automated CI/CD using Skeema is about to become a lot easier!
Skeema uses a declarative approach to schema management: the repository reflects a desired end-state of table definitions, and the tool figures out how to convert any database into this state. This contrasts with most preexisting schema management systems, which instead are based on a concept of migrations: an incremental series of files, each defining a schema change operation and its corresponding rollback. In this post, we’ll discuss the differences in these approaches.