Abstract
Developing with a database often presents challenges, such as typing issues and setting up new instances for testing or handling migrations. While these issues can be frustrating, there are ways to improve your database management skills and simplify your workflow with an SQL-first approach.
One effective approach is to integrate open-source projects into your Go coding workflow. The following tools are particularly useful:
- dbmate for managing automatic migrations
- sqlc to ensure type safety
- testcontainers to create integration tests
By running a DB inside a Linux container and testing everything, you can ensure that your database is working properly and catch any issues early on. If you're struggling with database management, consider using these tools to streamline your workflow.
In this talk we are going to see:
- Brief overview of the involved tools and why we want to apply this process to our workflow;
- LIVE CODING to demonstrate how this approach works with a PostgreSQL database.