Freedom251 › Database Migration Tools
Ridgepole

What Ridgepole is
Ridgepole is a free, self-hosted Ruby gem for managing database schemas with Rails DSL. You define the desired schema, then Ridgepole can export a database schema to a Schemafile, compare definitions, and apply changes. Its --dry-run option previews schema changes before they are applied. The README demonstrates table and column renames, foreign keys, check constraints, indexes, generated columns, and SQL execution. It documents MySQL and PostgreSQL examples, but not SQLite support. The repository identifies the license as MIT. Ridgepole can be added to an application's Gemfile or installed with gem install ridgepole. The README associates Ridgepole v3.1.0 with Rails 8.1 and v3.0.0 with Rails 8.0. From v1.0 onward, dropping tables is skipped by default and requires --drop-table; partitioning is no longer supported from v1.1.0. A table using renamed_from needs other changes applied separately. For check constraints, the README advises matching expressions to the database's exported form to avoid unnecessary migrations.
Who it suits
Ridgepole suits developers who want to define database schemas with Rails DSL and apply changes from code. It is relevant to teams using MySQL or PostgreSQL who can work with a self-hosted Ruby gem.
What it does well
- Free and MIT-licensed
- Previews changes with --dry-run
- Exports schemas to a Schemafile
- Documents MySQL and PostgreSQL examples
What to know first
- SQLite is not supported
- Partitioning is not supported from v1.1.0
- Table drops require --drop-table
- Renamed tables need other changes separately
Limits
Ridgepole does not support SQLite, and partitioning is unavailable from v1.1.0. Table deletion is skipped by default and requires the --drop-table option.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Ridgepole | MIT-licensed Ruby gem · SQLite is not supported · table partitioning is not supported | Free |
As github.com lists them, read 4 Oct 2026. The maker's own page has the final word.
Getting started
- Open the Ridgepole GitHub repository
- Add Ridgepole to your application's Gemfile or install it with gem install ridgepole
- Define the desired schema with Rails DSL
- Export the database schema to a Schemafile
- Compare definitions and review the dry run
- Apply the schema changes
Verdict
Ridgepole offers code-based schema comparison and updates, with a dry-run preview and support examples for MySQL and PostgreSQL. Check its database and migration constraints before adopting it.
Questions
What does Ridgepole cost?
Ridgepole is free, open source, and distributed under the MIT license.
How is Ridgepole installed?
Add it to an application's Gemfile or install it with gem install ridgepole.
Which databases are documented?
The README documents MySQL and PostgreSQL examples. SQLite is not supported.
Which Rails versions are identified?
Ridgepole v3.1.0 supports Rails 8.1, while v3.0.0 supports Rails 8.0.
Does Ridgepole support dry runs and schema diffs?
Yes. It compares schema definitions, detects drift, and its --dry-run option previews changes before application.
How are table drops handled?
Dropping tables is skipped by default from Ridgepole v1.0 onward; use --drop-table to enable it.
Facts from Ridgepole's own pages
- Database compatibility detail
- The README advises matching check constraint expressions to the database's exported form to avoid unnecessary migrations. · github.com, 4 Oct 2026
- Database support
- The README documents MySQL and PostgreSQL examples and states that SQLite is not supported. · github.com, 4 Oct 2026
- Distribution
- Ridgepole is distributed as a Ruby gem and the repository identifies its license as MIT. · github.com, 4 Oct 2026
- Dry run
- The --dry-run option previews schema changes before applying them. · github.com, 4 Oct 2026
- Installation
- Ridgepole can be added to an application's Gemfile or installed with gem install ridgepole. · github.com, 4 Oct 2026
- Partitioning
- The README states that partitioning is no longer supported from Ridgepole v1.1.0. · github.com, 4 Oct 2026
- Purpose
- Ridgepole manages database schemas by defining them with Rails DSL and updating the database to match. · github.com, 4 Oct 2026
- Rails compatibility
- The README says Ridgepole v3.1.0 supports Rails 8.1 and v3.0.0 supports Rails 8.0. · github.com, 4 Oct 2026
- Rename behavior
- When renamed_from is used on a table, other changes to that table are not detected in the same migration and must be applied in a separate step. · github.com, 4 Oct 2026
- Schema features
- The README demonstrates table and column renames, foreign keys, check constraints, indexes, generated columns, and SQL execution. · github.com, 4 Oct 2026
- Schema workflow
- It can export a database schema to a Schemafile, compare schema definitions, and apply changes. · github.com, 4 Oct 2026
- Table deletion
- Dropping tables is skipped by default in Ridgepole v1.0 and later; the README says to pass --drop-table to enable it. · github.com, 4 Oct 2026
Where Ridgepole stands on Freedom251
- Database Migration Tools#24 of 32