SaaSHub helps you find the best software and product alternatives Learn more →
Top 14 schema-migration Open-Source Projects
-
bytebase
The GitLab/GitHub for database DevOps. World's most advanced database DevOps and CI/CD for Developer, DBA and Platform Engineering teams.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Project mention: "At GitHub we do not use foreign keys, ever, anywhere" | news.ycombinator.com | 2024-01-22
Project mention: Ask HN: What tool(s) do you use to code review and deploy SQL scripts? | news.ycombinator.com | 2024-04-14We have been building https://github.com/bytebase/bytebase for 3+ years. You can think it of as GitHub/GitLab for SQL changes, with integrated GitOps, code review and deployment.
You can further check out this tutorial to get a feel of our GitOps solution
https://www.bytebase.com/docs/tutorials/database-change-mana...
Project mention: Pgroll: zero-downtime, undoable, schema migrations for Postgres | news.ycombinator.com | 2023-10-03Forr postgres, how does the schema diffing aspect compare to migra?
https://github.com/djrobstep/migra
I'm asking because, although migra is excellent and there are multiple migrations tools based on it (at least https://github.com/bikeshedder/tusker and https://github.com/blainehansen/postgres_migrator), issues are piling up but development seem to be slowing down
Project mention: We built our customer data warehouse all on Postgres | news.ycombinator.com | 2024-02-02Thanks! Yeah definitely agree that building out declarative table management for Postgres would be a major effort. A few open source projects I've seen in that area include:
https://github.com/sqldef/sqldef (Go)
https://github.com/bikeshedder/tusker (Python but being ported to Rust)
https://github.com/tyrchen/renovate (Rust)
https://github.com/blainehansen/postgres_migrator (Rust)
Some of these are based on parsing SQL, and others are based on running the CREATEs in a temporary location and introspecting the result.
The schema export side can be especially tricky for Postgres, since it lacks a built-in equivalent to MySQL's SHOW CREATE TABLE. So most of these declarative pg tools shell out to pg_dump, or require the user to do so. But sqldef actually implements CREATE TABLE dumping in pure Golang if I recall correctly, which is pretty cool.
There's also the question of implementing the table diff logic from scratch, vs shelling out to another tool or using a library. For the latter path, there's a nice blog post from Supabase about how they evaluated the various options: https://supabase.com/blog/supabase-cli#choosing-the-best-dif...
For example, take the popular data-migrate gem. Its gemspec requires activerecord >= 6.1 with no upper bound. Looking at the changelog, though, you'll see that support for Rails 7.1 wasn't added until version 9.2.0. Older versions will hit this exception when someone tries to run migrations under the latest Rails, even though bundler installs the package with no warning.
If a tool blindly drops columns, that's just a bad tool! It doesn't mean the concept is flawed.
Thousands of companies successfully use declarative schema management. Google and Facebook are two examples at a large scale, but it's equally beneficial at smaller scales too. As long as the workflow has sufficient guardrails, it's safe and it speeds up development time.
Some companies use it to auto-generate migrations (which are then reviewed/edited), while others use a fully declarative flow (no "migrations", but automated guardrails and human review).
I'm the author of Skeema (https://github.com/skeema/skeema) which has provided declarative flow for MySQL and MariaDB since 2016. Hundreds of companies use it, including GitHub, SendGrid, Cash App, Wix, Etsy, and many others you have likely heard of. Safety is the primary consideration throughout all of Skeema's design: https://www.skeema.io/docs/features/safety/
Meanwhile a few declarative solutions that support Postgres include sqldef, Migra, Tusker (which builds on Migra), and Atlas.
Project mention: Pgroll: zero-downtime, undoable, schema migrations for Postgres | news.ycombinator.com | 2023-10-03Very cool! Congratulations to the authors on the release! I'm the author of a similar (zero-downtime migration) tool for PG called QuantumDB[0]. It was the first (to my knowledge at least) tool to support foreign keys, by creating table copies (keeping those in sync using triggers), and exposing multiple schemas through a custom database driver. I never got to production-ready version unfortunately, but I'm happy this one did. I'm seeing a lot of familiar concepts, and it looks well thought out.
[0] https://github.com/quantumdb/quantumdb
schema-migrations related posts
- Features I wish PostgreSQL had as a developer
- Undocumented Gem Incompatibilities with Rails 7.1
- "At GitHub we do not use foreign keys, ever, anywhere"
- How Meta Built the Infrastructure for Threads
- How Modern SQL Databases Are Changing Web Development - #3 Better Developer Experience
- Data Migration Strategies in Ruby on Rails: The Right Way to Manage Missing Data
- Automagically generate migrations for GORM
-
A note from our sponsor - SaaSHub
www.saashub.com | 27 Apr 2024
Index
What are some of the best open-source schema-migration projects? This list will help you:
Project | Stars | |
---|---|---|
1 | gh-ost | 11,997 |
2 | bytebase | 10,029 |
3 | migra | 2,865 |
4 | sqldef | 1,814 |
5 | data-migrate | 1,357 |
6 | skeema | 1,232 |
7 | turbosql | 188 |
8 | departure | 134 |
9 | jpa2ddl | 111 |
10 | schematic | 84 |
11 | quantumdb | 60 |
12 | godfish | 7 |
13 | ratchet | 6 |
14 | examples | 0 |
Sponsored