Skip to main content

2 posts tagged with "golang"

View All Tags

Handling Migration Errors: How Atlas Improves on golang-migrate

· 11 min read
Noa Rogoszinski
Noa Rogoszinski
DevRel Engineer

Database migrations are fundamental to modern software development, allowing teams to evolve their database schema in a controlled and versioned manner. As applications grow and requirements change, the ability to reliably alter your database is crucial for maintaining data integrity and application stability.

Atlas was originally created to support Ent, a popular Go ORM. From the start, Ent shipped with a simple "auto-migration" feature that could set up the database schema based on the Ent schema. However, as the project grew popular, it became clear that a more robust versioned migration system was needed.

Ent's authors had hoped to add functionality based on the existing "auto-migration" engine to generate migration files, and use an off-the-shelf migration tool to apply them. The most promising candidate was golang-migrate, a widely adopted migration tool in the Go community renowned for its simplicity and wide database support. But like many tools that start simple and grow popular, we realized that golang-migrate, too, has its limitations, and they led us to expand on its abilities.

In this article, we’ll explore some common challenges teams face with traditional migration tools like golang-migrate, and how Atlas takes a different approach to improve the developer experience.

How Go Tests "go test"

· 21 min read
Rotem Tamir
Building Atlas

Adapted from a talk given at GopherCon Israel 2024

Introduction

How does Go, the project, and team behind it, test go test, the Go tool's command for running tests? Does Go test go test using the go test command? In this article, we explore the evolution of how the Go team tests the Go tool (go) and discuss strategies for testing command-line tools written in Go in general.