express-typescript-boilerplate icon indicating copy to clipboard operation
express-typescript-boilerplate copied to clipboard

Error when run setup

Open cladikzone opened this issue 5 years ago • 2 comments

When I run $ yarn run setup. this error comes

query failed: SELECT "ns"."nspname" AS "table_schema", "t"."relname" AS "table_name", "cnst"."conname" AS "constraint_name", "cnst"."consrc" AS "expression", CASE "cnst"."contype" WHEN 'p' THEN 'PRIMARY' WHEN 'u' THEN 'UNIQUE' WHEN 'c' THEN 'CHECK' END AS "constraint_type", "a"."attname" AS "column_name" FROM "pg_constraint" "cnst" INNER JOIN "pg_class" "t" ON "t"."oid" = "cnst"."conrelid" INNER JOIN "pg_namespace" "ns" ON "ns"."oid" = "cnst"."connamespace" INNER JOIN "pg_attribute" "a" ON "a"."attrelid" = "cnst"."conrelid" AND "a"."attnum" = ANY ("cnst"."conkey") WHERE "t"."relkind" = 'r' AND (("ns"."nspname" = 'public' AND "t"."relname" = 'pet')) error: { error: column cnst.consrc does not exist at Connection.parseE (/home/asus/Documents/projects/efilling/node_modules/pg/lib/connection.js:554:11) at Connection.parseMessage (/home/asus/Documents/projects/efilling/node_modules/pg/lib/connection.js:379:19) at Socket.<anonymous> (/home/asus/Documents/projects/efilling/node_modules/pg/lib/connection.js:119:22) at Socket.emit (events.js:198:13) at Socket.EventEmitter.emit (domain.js:448:20) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at Socket.Readable.push (_stream_readable.js:224:10) at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) name: 'error', length: 196, severity: 'ERROR', code: '42703', detail: undefined, hint: 'Perhaps you meant to reference the column "cnst.conkey" or the column "cnst.conbin".', position: '112', internalPosition: undefined, internalQuery: undefined, where: undefined, schema: undefined, table: undefined, column: undefined, dataType: undefined, constraint: undefined, file: 'parse_relation.c', line: '3369', routine: 'errorMissingColumn' } How can I solve this ?

cladikzone avatar Jun 17 '20 18:06 cladikzone

How can I solve this ?

Try downgrade postgresql to 11.8

tongrow avatar Jun 21 '20 12:06 tongrow

How can I solve this ?

Perhaps no longer relevant for you, but for other: update typeorm - https://github.com/typeorm/typeorm/issues/4332#issuecomment-562321524

underscorekadji avatar Nov 10 '20 11:11 underscorekadji