Skip to content

Fix direction values in template for Go migrations - #38

Open
ifraixedes wants to merge 2 commits into
CloudCom:masterfrom
ifraixedes:fix-go-migrations
Open

Fix direction values in template for Go migrations#38
ifraixedes wants to merge 2 commits into
CloudCom:masterfrom
ifraixedes:fix-go-migrations

Conversation

@ifraixedes

@ifraixedes ifraixedes commented Jul 27, 2016

Copy link
Copy Markdown

Having a Go migration I realized that they don't work with this fork meanwhile they worked with the original repo; the go file generated doesn't compile.

I also found that strings.ToTitle doesn't return the wanted outcome meanwhile strings.Title does.

This PR fix the 2 issues.

Change `strings.ToTitle` func by `strings.Title` because it's returns
the wanted outcome
@ifraixedes

Copy link
Copy Markdown
Author

Can anybody review the PR?
I need this issue solved, it's stopping our CI in some projects because we cannot run the Go migrations.

@zabawaba99

Copy link
Copy Markdown
Contributor

@ifraixedes I'm not sure if this repo is being maintained anymore but this fix exists in this version of the project https://github.com/steinbacher/goose/blob/master/migration_go.go

@ifraixedes

Copy link
Copy Markdown
Author

@zabawaba99 I could run that fork, using the same command that I use to run the migrations with this fork, I got

2016/07/28 12:49:08 WARNING: Database 'dsn' not specified. Please check ensure that you have a 'dsn' node set in your dbconf file. If you are not using a conf file please ensure that you have set the 'DB_DSN'
 environment variable.
2016/07/28 12:49:08 pq: SSL is not enabled on the server
makefile:30: recipe for target 'goose' failed

@zabawaba99

Copy link
Copy Markdown
Contributor

@ifraixedes that's right, I forgot about some difference between the projects. You would need to alter your yaml configuration to use dsn instead of open.

Old:

driver: postgres
 open: user=liam dbname=tester sslmode=disable

Current:

driver: postgres
 dsn: user=liam dbname=tester sslmode=disable

@ifraixedes

Copy link
Copy Markdown
Author

@zabawaba99 thanks, I cannot take a look know, I may try the following days, we have to move forward with several things, so for now we disabled the CI

@ifraixedes

Copy link
Copy Markdown
Author

@zabawaba99 I wanted to confirm that your fork works.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants