New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding product with sales channel fails #7100
Comments
A possible fix CREATE SEQUENCE IF NOT EXISTS products_sales_channel_id_seq; ALTER TABLE product_sales_channel ALTER COLUMN id SET DEFAULT nextval('product_sales_channel_id_seq'); CREATE OR REPLACE FUNCTION product_sales_channel_insert_trigger() CREATE TRIGGER IF NOT EXISTS product_sales_channel_insert_trigger |
Hi
When i try to add a product along with the sales channel, it fails with the error below. If i ignore sales channel in my backend it works. But I'm unable to attach the sales channel after that also
error: null value in column "id" of relation "product_sales_channel" violates not-null constraint\n at Parser.parseErrorMessage (/node_modules/pg-protocol/dist/parser.js:287:98)\n at Parser.handlePacket (/node_modules/pg-protocol/dist/parser.js:126:29)\n at Parser.parse (/node_modules/pg-protocol/dist/parser.js:39:38)\n at Socket. (/node_modules/pg-protocol/dist/index.js:11:42)\n at Socket.emit (node:events:514:28)\n at Socket.emit (node:domain:489:12)\n at addChunk (node:internal/streams/readable:324:12)\n at readableAddChunk (node:internal/streams/readable:297:9)\n at Readable.push (node:internal/streams/readable:234:10)\n at TCP.onStreamRead (node:internal/stream_base_commons:190:23)\n at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {length: 350, name: 'error', severity: 'ERROR', c…, …}
code:
'23502'
column:
'id'
constraint:
undefined
dataType:
undefined
detail:
'Failing row contains (prod_01HVTNVK32ZTD3DHMT2PHCHWWB, sc_01HAR7GSYPPQJS4RNE57J28EYD, null, 2024-04-19 07:59:17.868847+00, 2024-04-19 07:59:17.868847+00, null).'
file:
'execMain.c'
hint:
undefined
internalPosition:
undefined
internalQuery:
undefined
length:
350
line:
'2003'
name:
'error'
The text was updated successfully, but these errors were encountered: