Hacker News new | ask | show | jobs
by bitspook 1595 days ago
Going through the readme and the homepage still left me asking "What exactly does it do?". Going through the readme, their home page, and this blog post (https://blog.ariga.io/meet-atlas-cli/), here's a tldr;

It's terraform, but for database.

- It allows defining SQL database schema in HCL (terraform's DSL) for now.

- It can inspect a database and create the HCL for it.

- It can do database migrations similar to terraform. You define the new schema in HCL, and it allegedly takes care of producing the SQL needed to perform the migration. It also has a "plan" step like Terraform.

---

I hope I didn't missunderstand or missed something.

1 comments

Hey bitspook! One of Atlas’s creators here. Thanks for sharing this!

You describe the existing state well. Atlas can currently be used to perform what we call declarative database migrations.

This is great for many use cases. But it will not do for others, for a few reasons .

First, there are many ways to get from point A to point B. The classic example is a table rename. To get from the existing to the desired state, we can either ALTER TABLE or DROP and CREATE it. What did the user mean? Second, migrations are a very sensitive operation that can easily result in an outage if done wrong. Therefore, many companies check each migration into source control and have it reviewed in CR, and perform different quality and safety assessments on it.

Therefore, while “terraform for DBs” sounds great, it’s not enough. In the next versions of Atlas, we’re rolling out a different workflow that we call migration authoring or “versioned migrations” that address these issues in a very cool way that I hope many will view as useful.

Happy to answer any questions! R

this sounds interesting! can you please do a comparison matrix with flyway and also think if you can implement its features?

The iterative approach helps massively