Managing a Relational Database for a Python Project
- Finn Andersen
- Nov 11, 2024
- 1 min read
On a recent project I was responsible for developing the tooling, processes and automation for managing PostgreSQL database schema migrations and facilitating testing against a local copy of the database.

My solution leverages Ariga's Atlas tool to provide a simple interface for creating & validating schema migrations, and Lambda-backed custom resource which is triggered upon CF stack deployment to apply them. I also developed custom pytest fixtures which provide a connection to an automatically managed containerised DB instance.
I've taken those valuable learnings and packaged them into this project template, which I hope can help others facing a similar challenge! Check it out here to see the details of what's involved and how it helps to simplify the experience of working with a relational database.
Comments