How do you handle migrations ?

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

InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • 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.

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

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

  • liquibase

    Main Liquibase Source

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

  • goose

    A database migration tool. Supports SQL migrations and Go functions.

    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.

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

  • 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

  • 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
  • Database migration tool

    4 projects | /r/golang | 10 Jul 2023
  • PHP to Golang

    9 projects | /r/golang | 3 Jun 2023

Did you konow that Go is
the 4th most popular programming language
based on number of metions?