product variant price entety has channel id but not related by foreign key why? #1174
Unanswered
loveyandex
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I can't remember the reasoning for this, or maybe there was no reason and it was just an oversight on my part. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
it should be related to channel why not connected with fk??
i understand each productvarient in each channel must able to have a price for many reasons
so it has to connect channel with foreign key
in this such way we add it in language level but not in table relation
create table product_variant_price
(
"createdAt" timestamp default now() not null,
"updatedAt" timestamp default now() not null,
price integer not null,
id serial not null
constraint "PK_ba659ff2940702124e799c5c854"
primary key,
"channelId" integer not null,
"variantId" integer
constraint "FK_e6126cd268aea6e9b31d89af9ab"
references product_variant
);
Beta Was this translation helpful? Give feedback.
All reactions