I apologize if this issue is a little amorphous, but I spent a considerable amount of time trying to work this out so I wanted to point it out.
I am planning to use sqlc with golang-migrate, which the documentation explicitly calls out. However, the latest release does not contain the code necessary to work with golang-migrate; specifically, the .down.sql files aren't being ignored in v0.1.0.
master: https://github.com/kyleconroy/sqlc/blob/master/internal/dinosql/parser.go#L83-L95
v0.1.0: https://github.com/kyleconroy/sqlc/blob/v0.1.0/internal/dinosql/parser.go#L81-L89
This leads to the following issue when using v0.1.0:
→ sqlc generate [0d086f9]
# package pg
state/pg/migrate/000001_basic_user.down.sql:3:1: relation "basic_user_permission" does not exist
state/pg/migrate/000001_basic_user.down.sql:4:1: relation "basic_user" does not exist
Obviously, I can clone the repository and build sqlc myself, but that won't be sustainable longterm on a large team with varying levels of Go knowledge.
Would it be possible to get another release? Or to update the documentation with some kind of warning?
EDIT: I just noticed that the commit that added the golang-migrate bit is relatively new (#320). Apologies if this issue seems premature!
I apologize if this issue is a little amorphous, but I spent a considerable amount of time trying to work this out so I wanted to point it out.
I am planning to use
sqlcwithgolang-migrate, which the documentation explicitly calls out. However, the latest release does not contain the code necessary to work withgolang-migrate; specifically, the.down.sqlfiles aren't being ignored inv0.1.0.master: https://github.com/kyleconroy/sqlc/blob/master/internal/dinosql/parser.go#L83-L95v0.1.0: https://github.com/kyleconroy/sqlc/blob/v0.1.0/internal/dinosql/parser.go#L81-L89This leads to the following issue when using
v0.1.0:Obviously, I can clone the repository and build
sqlcmyself, but that won't be sustainable longterm on a large team with varying levels of Go knowledge.Would it be possible to get another release? Or to update the documentation with some kind of warning?
EDIT: I just noticed that the commit that added the
golang-migratebit is relatively new (#320). Apologies if this issue seems premature!