Using REF for multiple foreign keys

Hi, I need help

Using dbdiagram modeler, I need to specify a foreign key in order to get the follow Postgres sql sentence:

ALTER TABLE “AnalistaCicloQa” ADD FOREIGN KEY (“IdQa”,“NCiclo”) REFERENCES “CicloQa” (“IdQa”,“NCiclo”);

I’m using the follow sentences, but are not working because i’m not referencing a unique key into "CicloQA "table. The unique key in that table is (IdQa, NCiclo)

Ref: CicloQa.IdQa < AnalistaCicloQa.IdQa
Ref: CicloQa.NCiclo < AnalistaCicloQa.NCiclo

Could you tell me how to spcecify the “Ref” to get the correct “Alter Table” sentence?

I got it!!.
Ref: CicloQa.(IdQa,NCiclo) < AnalistaCicloQa.(IdQa,NCiclo)

Sorry.

Hi Ivan,

Welcome to our community!

We are glad that you found the answer. Your solution is correct.

Cheer