How do you handle migrations ?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. atlas

    Manage your database schema as code (by ariga)

    You might want to check out Atlas. It provides automatic migration planning for GORM, and has various guides on how deploying schema migration on the popular platform and tools, such as Helm, Kubernetes and ECS.

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. migrate

    Database migrations. CLI and Golang library.

    We use https://github.com/golang-migrate/migrate in an init-container, which (1) supports multiple durable storage technologies and (2) handles logical locking for the case where multiple migrations start concurrently.

  4. liquibase

    Main Liquibase Source

    We use https://github.com/liquibase/liquibase, as most of Dev are used to and comfortable with it.

  5. goose

    A database migration tool. Supports SQL migrations and Go functions. (by pressly)

    Next try https://github.com/pressly/goose We have this setup to be run by the CI-CD pipeline to be run before the application is started. BTW, this utility is compatible with https://sqlc.dev , so they work good together.

  6. sqlc

    Generate type-safe code from SQL

    Next try https://github.com/pressly/goose We have this setup to be run by the CI-CD pipeline to be run before the application is started. BTW, this utility is compatible with https://sqlc.dev , so they work good together.

  7. tern

    The SQL Fan's Migrator

    We use https://github.com/jackc/tern library (from the author of the pgx driver). We run migrations in k8s init containers and we do not do rollbacks (only up). Advantages over other popular solutions are:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Show HN: Outerbase Studio – Open-Source Database GUI

    19 projects | news.ycombinator.com | 4 Dec 2024
  • Sqlc: Compile SQL to type-safe code

    15 projects | news.ycombinator.com | 8 Sep 2024
  • How to handle migrations in Golang

    5 projects | dev.to | 11 Jun 2024
  • 👻Top 8 Free, Open Source SQL Clients🔥

    8 projects | dev.to | 4 Sep 2023
  • Open-sourcing SQX, a way to build flexible database models in Go

    5 projects | news.ycombinator.com | 2 Sep 2023