You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Unable to populate mock data, I am following the steps under README file. Issue occurs on the 4th step "Populate mock data"
To Reproduce
Steps to reproduce the behavior:
DB=postgres yarn run populate
Expected behavior
I would expect a successful data import message.
Environment (please complete the following information):
@vendure/core version: vendure-0.6.0
Nodejs version - v12.10.0
Database (mysql/postgres etc): postgres
Additional context
Please refer to error below:
`$ DB=postgres yarn run populate
yarn run v1.17.3
$ node -r ts-node/register populate-dev-server.ts
Using postgres connection
Clearing all tables...
Error occurred when attempting to clear tables!
QueryFailedError: column cnst.consrc does not exist
at new QueryFailedError (/www/test/vendure-0.6.0/src/error/QueryFailedError.ts:9:9)
at Query.callback (/www/test/vendure-0.6.0/src/driver/postgres/PostgresQueryRunner.ts:178:30)
at Query.handleError (/www/test/vendure-0.6.0/node_modules/pg/lib/query.js:142:17)
at Connection.connectedErrorMessageHandler (/www/test/vendure-0.6.0/node_modules/pg/lib/client.js:211:17)
at Connection.emit (events.js:209:13)
at Socket. (/www/test/vendure-0.6.0/node_modules/pg/lib/connection.js:126:12)
at Socket.emit (events.js:209:13)
at addChunk (_stream_readable.js:305:12)
at readableAddChunk (_stream_readable.js:286:11)
at Socket.Readable.push (_stream_readable.js:220:10) {
message: 'column cnst.consrc does not exist',
name: 'QueryFailedError',
length: 196,
severity: 'ERROR',
code: '42703',
detail: undefined,
hint: 'Perhaps you meant to reference the column "cnst.conkey" or the column "cnst.conbin".',
position: '194',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '3377',
routine: 'errorMissingColumn',
query: SELECT "ns"."nspname" AS "table_schema", "t"."relname" AS "table_name", "cnst"."conname" AS "constraint_name", CASE "cnst"."contype" WHEN 'x' THEN pg_get_constraintdef("cnst"."oid", true) ELSE "cnst"."consrc" END AS "expression", CASE "cnst"."contype" WHEN 'p' THEN 'PRIMARY' WHEN 'u' THEN 'UNIQUE' WHEN 'c' THEN 'CHECK' WHEN 'x' THEN 'EXCLUDE' 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" LEFT 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" = 'country_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'country') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'customer_group') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'asset') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'fulfillment') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'payment') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'refund') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'zone') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'channel') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'collection_asset') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'collection_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'collection') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'facet_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'facet') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'facet_value_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'facet_value') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_asset') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_option_group_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_option_group') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_option_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_option') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'tax_category') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_variant_asset') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_variant_price') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_variant_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_variant') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'stock_movement') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'order_item') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'order_line') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'promotion') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'shipping_method') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'order') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'role') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'user') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'customer') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'address') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'administrator') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'payment_method') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'session') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'tax_rate') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'global_settings') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'history_entry') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'search_index_item') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'zone_members_country') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'collection_product_variants_product_variant') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'collection_channels_channel') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_facet_values_facet_value') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_channels_channel') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_variant_options_product_option') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_variant_facet_values_facet_value') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'promotion_channels_channel') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'shipping_method_channels_channel') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'order_promotions_promotion') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'role_channels_channel') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'user_roles_role') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'customer_groups_customer_group')),
parameters: []
}
Done!
info 18/11/19, 13:32 - [Vendure Server] Bootstrapping Vendure Server (pid: 62012)...
error 18/11/19, 13:32 - [TypeORM] Query error: error: relation "zone" does not exist, "SELECT "Zone"."createdAt" AS "Zone_createdAt", "Zone"."updatedAt" AS "Zone_updatedAt", "Zone"."name" AS "Zone_name", "Zone"."id" AS "Zone_id", "Zone__members"."createdAt" AS "Zone__members_createdAt", "Zone__members"."updatedAt" AS "Zone__members_updatedAt", "Zone__members"."code" AS "Zone__members_code", "Zone__members"."enabled" AS "Zone__members_enabled", "Zone__members"."id" AS "Zone__members_id", "Zone__members_translations"."createdAt" AS "Zone__members_translations_createdAt", "Zone__members_translations"."updatedAt" AS "Zone__members_translations_updatedAt", "Zone__members_translations"."languageCode" AS "Zone__members_translations_languageCode", "Zone__members_translations"."name" AS "Zone__members_translations_name", "Zone__members_translations"."id" AS "Zone__members_translations_id", "Zone__members_translations"."baseId" AS "Zone__members_translations_baseId" FROM "zone" "Zone" LEFT JOIN "zone_members_country" "Zone_Zone__members" ON "Zone_Zone__members"."zoneId"="Zone"."id" LEFT JOIN "country" "Zone__members" ON "Zone__members"."id"="Zone_Zone__members"."countryId" LEFT JOIN "country_translation" "Zone__members_translations" ON "Zone__members_translations"."baseId"="Zone__members"."id"" -- []
QueryFailedError: relation "zone" does not exist
at new QueryFailedError (/www/test/vendure-0.6.0/src/error/QueryFailedError.ts:9:9)
at Query.callback (/www/test/vendure-0.6.0/src/driver/postgres/PostgresQueryRunner.ts:178:30)
at Query.handleError (/www/test/vendure-0.6.0/node_modules/pg/lib/query.js:142:17)
at Connection.connectedErrorMessageHandler (/www/test/vendure-0.6.0/node_modules/pg/lib/client.js:211:17)
at Connection.emit (events.js:209:13)
at Socket. (/www/test/vendure-0.6.0/node_modules/pg/lib/connection.js:126:12)
at Socket.emit (events.js:209:13)
at addChunk (_stream_readable.js:305:12)
at readableAddChunk (_stream_readable.js:286:11)
at Socket.Readable.push (_stream_readable.js:220:10) {
message: 'relation "zone" does not exist',
name: 'QueryFailedError',
length: 104,
severity: 'ERROR',
code: '42P01',
detail: undefined,
hint: undefined,
position: '890',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '1194',
routine: 'parserOpenTable',
query: 'SELECT "Zone"."createdAt" AS "Zone_createdAt", "Zone"."updatedAt" AS "Zone_updatedAt", "Zone"."name" AS "Zone_name", "Zone"."id" AS "Zone_id", "Zone__members"."createdAt" AS "Zone__members_createdAt", "Zone__members"."updatedAt" AS "Zone__members_updatedAt", "Zone__members"."code" AS "Zone__members_code", "Zone__members"."enabled" AS "Zone__members_enabled", "Zone__members"."id" AS "Zone__members_id", "Zone__members_translations"."createdAt" AS "Zone__members_translations_createdAt", "Zone__members_translations"."updatedAt" AS "Zone__members_translations_updatedAt", "Zone__members_translations"."languageCode" AS "Zone__members_translations_languageCode", "Zone__members_translations"."name" AS "Zone__members_translations_name", "Zone__members_translations"."id" AS "Zone__members_translations_id", "Zone__members_translations"."baseId" AS "Zone__members_translations_baseId" FROM "zone" "Zone" LEFT JOIN "zone_members_country" "Zone_Zone__members" ON "Zone_Zone__members"."zoneId"="Zone"."id" LEFT JOIN "country" "Zone__members" ON "Zone__members"."id"="Zone_Zone__members"."countryId" LEFT JOIN "country_translation" "Zone__members_translations" ON "Zone__members_translations"."baseId"="Zone__members"."id"',
parameters: []
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`
The text was updated successfully, but these errors were encountered:
Describe the bug
Unable to populate mock data, I am following the steps under README file. Issue occurs on the 4th step "Populate mock data"
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect a successful data import message.
Environment (please complete the following information):
Additional context
Please refer to error below:
`$ DB=postgres yarn run populate
yarn run v1.17.3
$ node -r ts-node/register populate-dev-server.ts
Using postgres connection
Clearing all tables...
Error occurred when attempting to clear tables!
QueryFailedError: column cnst.consrc does not exist
at new QueryFailedError (/www/test/vendure-0.6.0/src/error/QueryFailedError.ts:9:9)
at Query.callback (/www/test/vendure-0.6.0/src/driver/postgres/PostgresQueryRunner.ts:178:30)
at Query.handleError (/www/test/vendure-0.6.0/node_modules/pg/lib/query.js:142:17)
at Connection.connectedErrorMessageHandler (/www/test/vendure-0.6.0/node_modules/pg/lib/client.js:211:17)
at Connection.emit (events.js:209:13)
at Socket. (/www/test/vendure-0.6.0/node_modules/pg/lib/connection.js:126:12)
at Socket.emit (events.js:209:13)
at addChunk (_stream_readable.js:305:12)
at readableAddChunk (_stream_readable.js:286:11)
at Socket.Readable.push (_stream_readable.js:220:10) {
message: 'column cnst.consrc does not exist',
name: 'QueryFailedError',
length: 196,
severity: 'ERROR',
code: '42703',
detail: undefined,
hint: 'Perhaps you meant to reference the column "cnst.conkey" or the column "cnst.conbin".',
position: '194',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '3377',
routine: 'errorMissingColumn',
query:
SELECT "ns"."nspname" AS "table_schema", "t"."relname" AS "table_name", "cnst"."conname" AS "constraint_name", CASE "cnst"."contype" WHEN 'x' THEN pg_get_constraintdef("cnst"."oid", true) ELSE "cnst"."consrc" END AS "expression", CASE "cnst"."contype" WHEN 'p' THEN 'PRIMARY' WHEN 'u' THEN 'UNIQUE' WHEN 'c' THEN 'CHECK' WHEN 'x' THEN 'EXCLUDE' 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" LEFT 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" = 'country_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'country') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'customer_group') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'asset') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'fulfillment') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'payment') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'refund') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'zone') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'channel') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'collection_asset') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'collection_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'collection') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'facet_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'facet') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'facet_value_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'facet_value') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_asset') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_option_group_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_option_group') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_option_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_option') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'tax_category') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_variant_asset') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_variant_price') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_variant_translation') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_variant') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'stock_movement') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'order_item') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'order_line') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'promotion') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'shipping_method') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'order') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'role') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'user') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'customer') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'address') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'administrator') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'payment_method') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'session') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'tax_rate') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'global_settings') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'history_entry') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'search_index_item') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'zone_members_country') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'collection_product_variants_product_variant') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'collection_channels_channel') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_facet_values_facet_value') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_channels_channel') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_variant_options_product_option') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'product_variant_facet_values_facet_value') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'promotion_channels_channel') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'shipping_method_channels_channel') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'order_promotions_promotion') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'role_channels_channel') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'user_roles_role') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'customer_groups_customer_group'))
,parameters: []
}
Done!
info 18/11/19, 13:32 - [Vendure Server] Bootstrapping Vendure Server (pid: 62012)...
error 18/11/19, 13:32 - [TypeORM] Query error: error: relation "zone" does not exist, "SELECT "Zone"."createdAt" AS "Zone_createdAt", "Zone"."updatedAt" AS "Zone_updatedAt", "Zone"."name" AS "Zone_name", "Zone"."id" AS "Zone_id", "Zone__members"."createdAt" AS "Zone__members_createdAt", "Zone__members"."updatedAt" AS "Zone__members_updatedAt", "Zone__members"."code" AS "Zone__members_code", "Zone__members"."enabled" AS "Zone__members_enabled", "Zone__members"."id" AS "Zone__members_id", "Zone__members_translations"."createdAt" AS "Zone__members_translations_createdAt", "Zone__members_translations"."updatedAt" AS "Zone__members_translations_updatedAt", "Zone__members_translations"."languageCode" AS "Zone__members_translations_languageCode", "Zone__members_translations"."name" AS "Zone__members_translations_name", "Zone__members_translations"."id" AS "Zone__members_translations_id", "Zone__members_translations"."baseId" AS "Zone__members_translations_baseId" FROM "zone" "Zone" LEFT JOIN "zone_members_country" "Zone_Zone__members" ON "Zone_Zone__members"."zoneId"="Zone"."id" LEFT JOIN "country" "Zone__members" ON "Zone__members"."id"="Zone_Zone__members"."countryId" LEFT JOIN "country_translation" "Zone__members_translations" ON "Zone__members_translations"."baseId"="Zone__members"."id"" -- []
QueryFailedError: relation "zone" does not exist
at new QueryFailedError (/www/test/vendure-0.6.0/src/error/QueryFailedError.ts:9:9)
at Query.callback (/www/test/vendure-0.6.0/src/driver/postgres/PostgresQueryRunner.ts:178:30)
at Query.handleError (/www/test/vendure-0.6.0/node_modules/pg/lib/query.js:142:17)
at Connection.connectedErrorMessageHandler (/www/test/vendure-0.6.0/node_modules/pg/lib/client.js:211:17)
at Connection.emit (events.js:209:13)
at Socket. (/www/test/vendure-0.6.0/node_modules/pg/lib/connection.js:126:12)
at Socket.emit (events.js:209:13)
at addChunk (_stream_readable.js:305:12)
at readableAddChunk (_stream_readable.js:286:11)
at Socket.Readable.push (_stream_readable.js:220:10) {
message: 'relation "zone" does not exist',
name: 'QueryFailedError',
length: 104,
severity: 'ERROR',
code: '42P01',
detail: undefined,
hint: undefined,
position: '890',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '1194',
routine: 'parserOpenTable',
query: 'SELECT "Zone"."createdAt" AS "Zone_createdAt", "Zone"."updatedAt" AS "Zone_updatedAt", "Zone"."name" AS "Zone_name", "Zone"."id" AS "Zone_id", "Zone__members"."createdAt" AS "Zone__members_createdAt", "Zone__members"."updatedAt" AS "Zone__members_updatedAt", "Zone__members"."code" AS "Zone__members_code", "Zone__members"."enabled" AS "Zone__members_enabled", "Zone__members"."id" AS "Zone__members_id", "Zone__members_translations"."createdAt" AS "Zone__members_translations_createdAt", "Zone__members_translations"."updatedAt" AS "Zone__members_translations_updatedAt", "Zone__members_translations"."languageCode" AS "Zone__members_translations_languageCode", "Zone__members_translations"."name" AS "Zone__members_translations_name", "Zone__members_translations"."id" AS "Zone__members_translations_id", "Zone__members_translations"."baseId" AS "Zone__members_translations_baseId" FROM "zone" "Zone" LEFT JOIN "zone_members_country" "Zone_Zone__members" ON "Zone_Zone__members"."zoneId"="Zone"."id" LEFT JOIN "country" "Zone__members" ON "Zone__members"."id"="Zone_Zone__members"."countryId" LEFT JOIN "country_translation" "Zone__members_translations" ON "Zone__members_translations"."baseId"="Zone__members"."id"',
parameters: []
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`
The text was updated successfully, but these errors were encountered: