Need help in registering and running go binary migration. #346
Unanswered
anishjain94
asked this question in
Q&A
Replies: 2 comments 13 replies
-
@mfridman @VojtechVitek @rliebz Do you guys might know why this is happening? |
Beta Was this translation helpful? Give feedback.
13 replies
-
I could be nuts, but it looks like you're running the global I'd suggest not naming the compiled binary "goose" as that'll just be way too easy to confuse with the real one. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all, After the latest release of goose, i wanted to use SQL + Go migrations. after building using command
go build -o goose ./00054_fetch_user_data.go
, a goose file is created. but when i am runninggoose up
, it is throwing error2022/05/10 18:05:30 goose run: ERROR 00054_fetch_user_data.go: failed to run Go migration: Go functions must be registered and built into a custom binary (see https://github.com/pressly/goose/tree/master/examples/go-migrations)
current directory structure -
all sql files are present in (/go/src/pice_client_apis/infra/database/migration/)
/go/src/pice_client_apis/infra/database/migration/00054_fetch_user_data.go
➜ migration git:(uat) ✗ go build -o goose ./00054_fetch_user_data.go
➜ migration git:(uat) ✗ goose up
2022/05/10 18:04:55 goose run: ERROR 00054_fetch_user_data.go: failed to run Go migration: Go functions must be registered and built into a custom binary (see https://github.com/pressly/goose/tree/master/examples/go-migrations)
➜ migration git:(uat) ✗ go build -o goose ./00054_fetch_user_data.go
➜ migration git:(uat) ✗ goose up
2022/05/10 18:05:30 goose run: ERROR 00054_fetch_user_data.go: failed to run Go migration: Go functions must be registered and built into a custom binary (see https://github.com/pressly/goose/tree/master/examples/go-migrations)
Please help me out. 🙏🏼
Beta Was this translation helpful? Give feedback.
All reactions