Here at Watermark Community Church we’ve been developing our toolchain around Contentful for the last several months, and felt it was time to publicize one of our most important tools. We call it contentful-schema-diff.
The purpose of this tool is to inspect two spaces and determine the differences in their content-types, and then to output a migration file compatible with the contentful-migration CLI.
In our workflow, these migration scripts are stored in the
db/migrate directory. We have our own fork of contentful-migration, which only runs migration files that have not already been run in the space. The record of these migrations is stored in a special content type in the space.
All of these tools are open-source at the moment, and we will continue supporting them as long as we are on the Contentful platform for our primary CMS. Pull requests welcome!