Skip to content

Commit

Permalink
fix: inverted hasDefault logic
Browse files Browse the repository at this point in the history
  • Loading branch information
rintaun committed Nov 22, 2020
1 parent 6b52230 commit 444f875
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/database/SchemaInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class SchemaInfo {
return await this.pool.many(sql<ColumnInfo>`
SELECT c.column_name AS "name"
, (c.is_nullable = 'YES') AS "nullable"
, (c.column_default IS NULL) AS "hasDefault"
, (c.column_default IS NOT NULL) AS "hasDefault"
, c.ordinal_position AS "order"
, COALESCE(de.udt_name, dc.udt_name, e.udt_name, e.data_type, c.udt_name, c.data_type) AS "type"
, (c.data_type = 'ARRAY') AS "isArray"
Expand Down

0 comments on commit 444f875

Please sign in to comment.