Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

status fails with mysql if the dsn does not have parseTime=true #101

Closed
ntindall opened this issue Mar 29, 2018 · 2 comments
Closed

status fails with mysql if the dsn does not have parseTime=true #101

ntindall opened this issue Mar 29, 2018 · 2 comments

Comments

@ntindall
Copy link
Contributor

ntindall commented Mar 29, 2018

To reproduce: run ./bin/goose mysql $DSN status where DSN is a DSN with no parameters.

This produces the following output:

    Applied At                  Migration
    =======================================
2018/03/29 22:07:13 sql: Scan error on column index 0: unsupported Scan, storing driver.Value type []uint8 into type *time.Time

I modified by DSN to have the parseTime=true parameter, and the problem subsides. Should goose really be so opinionated about how the DSN is formatted in order to work?

We could consider appending / inserting the &parseTime=true option into the dsn param sequence, if it is not present. Alternatively, we changing the struct holder to take a string and then parse it as needed (but maybe we need to strip parseTime in that case?).

@VojtechVitek
Copy link
Collaborator

VojtechVitek commented Mar 29, 2018

Both options sound good to me. Can you provide Pull Request for this?

@ntindall
Copy link
Contributor Author

ntindall commented Mar 30, 2018

@VojtechVitek #102

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

No branches or pull requests

2 participants