PostgreSQL

Simple Schema Migration With Go

In 2010 I wrote about a simple method for migrating schema with Python. Here’s the same kind of thing, but this time using Go. I’m using the SQLx extensions for database/sql and PostgreSQL as my database. The only requirement is an extra table named schema with a single version in it. This tracks which version of the schema update has been applied. This table is created in the first schema update below.