shmig
renovate
shmig | renovate | |
---|---|---|
2 | 3 | |
458 | 79 | |
- | - | |
0.0 | 10.0 | |
5 months ago | over 1 year ago | |
Shell | Rust | |
BSD 3-clause "New" or "Revised" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
shmig
- Schmig: Database migration tool written in BASH
-
We built our customer data warehouse all on Postgres
I was looking for a way to run migrations across SQLite and Postgres without requiring an unrelated language ecosystem (e.g., Node, Python, Ruby, Java, etc), and discovered Shmig.
It's pretty great.
https://github.com/mbucc/shmig
Would love to see DB unit test infra with the the same values.
renovate
-
We built our customer data warehouse all on Postgres
Thanks! 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...
- Renovate: A new way to handle Postgres schema migration, inspired by Terraform
-
Renovate: A new way to handle Postgres schema migration
If it looks interesting to you, here's the repo with more details: https://github.com/tyrchen/renovate.
What are some alternatives?
bytebase.com - Source for bytebase.com
renovate - Universal dependency automation tool.
Prisma - Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
atlas - Manage your database schema as code