Skip to content

jeromefroe/migrate-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL Migration

This repository contains an example of how to use the golang-migrate to automatically migrate a SQL database to a desired schema.

# Start a Postgres database that our example will connect to.
docker run --name postgres-migration -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres

# Run the application.
go run .

# Clean up the database.
docker stop postgres-migration && docker rm postgres-migration

About

An example of automatically migrating a database schema in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors