Go schema-management

Open-source Go projects categorized as schema-management

Go schema-management Projects

  • sqldef

    Idempotent schema management for MySQL, PostgreSQL, and more

  • Project mention: We built our customer data warehouse all on Postgres | news.ycombinator.com | 2024-02-02

    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...

  • skeema

    Declarative pure-SQL schema management for MySQL and MariaDB

  • Project mention: Features I wish PostgreSQL had as a developer | news.ycombinator.com | 2024-04-05

    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.

  • 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.

    WorkOS logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Go schema-management related posts

Index

Project Stars
1 sqldef 1,811
2 skeema 1,229

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com