How to add "references" for many to many relationships postgres
I would like to be able to manage my many to many relationships inside phpstorm's db manager, however i cannot see how to easlier do it.
CREATE TABLE bill_product (
bill_id int REFERENCES bill (bill_id) ON UPDATE CASCADE ON DELETE CASCADE
, product_id int REFERENCES product (product_id) ON UPDATE CASCADE
, amount numeric NOT NULL DEFAULT 1
, CONSTRAINT bill_product_pkey PRIMARY KEY (bill_id, product_id) -- explicit pk
);
Is what I am looking to add without using the console.
请先登录再写评论。