Ask HN: What tool(s) do you use to code review and deploy SQL scripts?

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • dbmate

    :rocket: A lightweight, framework-agnostic database migration tool.

  • A regular code repo with the scripts (with pull/merge requests for review) and then a CI job that builds containers with something like dbmate https://github.com/amacneil/dbmate that can then be run against any staging/prod environment.

  • sqitch

    Sensible database change management

  • We use https://sqitch.org/ and we’re fairly happy with it. Sqitch manages the files to deploy which are applied fits to a local database.

    We use GitHub actions for deployment and database migrations are just one step of the pipeline. The step invokes sqitch deploy which runs all the pending migration files.

    Then, all the approval process is standard for the environment. We require approvals in pull requests before merging to the main branch.

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

    The GitLab/GitHub for database DevOps. World's most advanced database DevOps and CI/CD for Developer, DBA and Platform Engineering teams.

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

  • tern

    The SQL Fan's Migrator

  • We have a repo with migrations written in SQL, and we use tern[1] to apply them.

    [1]: https://github.com/jackc/tern

  • Flyway

    Flyway by Redgate • Database Migrations Made Easy.

  • Also RedGate, but Flyway has some reasons to recommend it over RedGate Deploy depending on your DBAs/workflows: https://flywaydb.org/

    (Though I don't think it is "complete" or "perfect", either.)

    EF Migrations are in a really good place now if you like/don't mind C# as a language (and you can easily embed SQL inside the C#, too, but there are benefits to being able to also run high level C# code). With today's tooling you can package your migration "runner application" as a single deployable executable for most platforms. You can build the executable once and run it in all your environments. (The same tool that updates your QA and Staging updates your Prod, testably running the same migrations.) Given the single executable deployable I might even consider using it for projects not themselves written in C#.

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

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