go-pg / migrations

SQL database migrations for Golang go-pg and PostgreSQL
https://godoc.org/github.com/go-pg/migrations
BSD 2-Clause "Simplified" License
309 stars 59 forks source link

Example doesn't work #72

Closed weijiangan closed 5 years ago

weijiangan commented 5 years ago

I just tried the example, and it doesn't seem to read the .go migrations (1,2,3) and jumps straight to the .sql migration, which causes errors of course.

Forcing it go migrate to specific version doesn't seem to work either:

$ go run main.go up 1
version is 0

It seems that it might have something to do with the recent update.

vmihailenco commented 5 years ago

It works for me. Make sure to enable go modules via GO111MODULE=on.