migrate/driver/postgres
goenning f1738e78db allow use of big version numbers 2017-01-18 22:19:02 +00:00
..
README.md Merge pull request #59 from bfitzsimmons/patch-1 2016-12-21 20:44:14 -08:00
postgres.go allow use of big version numbers 2017-01-18 22:19:02 +00:00
postgres_test.go allow use of big version numbers 2017-01-18 22:19:02 +00:00

README.md

PostgreSQL Driver

  • Runs migrations in transactions. That means that if a migration fails, it will be safely rolled back.
  • Tries to return helpful error messages.
  • Stores migration version details in table schema_migrations. This table will be auto-generated.

Usage

migrate -url postgres://user@host:port/database -path ./db/migrations create add_field_to_table
migrate -url postgres://user@host:port/database -path ./db/migrations up
migrate help # for more info

# TODO(mattes): thinking about adding some custom flag to allow migration within schemas:
-url="postgres://user@host:port/database?schema=name"

# see more docs: https://godoc.org/github.com/lib/pq#hdr-Connection_String_Parameters

Authors