Handling database migrations manually becomes difficult when multiple developers or agents are working in parallel. Someone may update the application code but forget to update the database, or a schema change may be made directly in a shared environment and never added to the repository.

One way to make this process safer is to treat database migrations as code and validate them in the CI pipeline.

You can feed your agent the Skill to figure this out by itself.

In this post, I will use two tools:

Goose to create, track, and apply migrations.