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

hasColumn behaviour #87

Closed
gwilymhumphreys opened this Issue Oct 4, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@gwilymhumphreys

gwilymhumphreys commented Oct 4, 2013

Hey mate - a few things I noticed with hasColumn that I was hoping you could clear up:

  • The docs state that it's a method on table, but it seems to only be available on the schema object?
  • It doesn't seem to function in mysql - throws an error such as:

Error: {"sql":["show columns from reverses like ?"],"bindings":["reverses","id"]}

e.g.

schema.table('tablename', function(table) { 

    table.hasColumn(...) // doesn't exist 

})

schema.hasColumn('tablename', 'column').exec(...) // works in postgres, above error in mysql

Let me know if I'm missing something or if you could use more information.

Thanks for the lib by the way, great work!

@tgriesser tgriesser closed this in 3ebc4cb Oct 7, 2013

@tgriesser

This comment has been minimized.

Owner

tgriesser commented Oct 7, 2013

Thanks for the issue @gwilymhumphreys! The MySQL bug should be fixed in the latest release! It actually should be schema.hasColumn - this is also updated in the docs.

@gwilymhumphreys

This comment has been minimized.

gwilymhumphreys commented Oct 7, 2013

Brilliant, cheers mate

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