knex / knex-schema-inspector

Utility for extracting information about existing DB schema
MIT License
99 stars 43 forks source link

Fix postgres hascolumn return value #140

Open baumerdev opened 1 year ago

baumerdev commented 1 year ago

According to the type definitions the hasColumn should return a Promise with boolean

hasColumn(table: string, column: string): Promise<boolean>;

It seems that all other dialects have this implemented the right way and only hasColumn for PostgreSQL returned an empty array when it should return false and an array with an object when it should return true.

This PR fixes that.