Skip to content

PostgresQueryRunner.hasColumn throw error #202

@mingyang91

Description

@mingyang91

Error log

[2017-01-14 16:21:44.727] [ERROR] DB - query failed: SELECT * FROM information_schema.tables WHERE table_catalog = 'ebdb' AND table_schema = 'public' AND table_name = 'candidate' AND column_name = 'phone'
[2017-01-14 16:21:44.727] [ERROR] DB - error during executing query:error: column "column_name" does not exist
[2017-01-14 16:21:44.730] [DEBUG] DB - executing query: ROLLBACK
[2017-01-14 16:21:44.764] [ERROR] DB_Connection - { error: column "column_name" does not exist
    at Connection.parseE (/Users/famer.me/Repository/vein/node_modules/pg/lib/connection.js:554:11)
    at Connection.parseMessage (/Users/famer.me/Repository/vein/node_modules/pg/lib/connection.js:381:17)

I think the sql in the hasColumn is not correct.
information_schema.tables table does not contain column column_name, he should be modified to information_schema.columns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions