Hi, I am trying to setup a DB for our Church’s Event management.
When I try to set a one-to-many relationship between two tables, which has multiple field unique keys, I get the above error message.
“Primary or unique constraint required on main table: “Reservations” in statement [ALTER TABLE “SessionMaster” ADD FOREIGN KEY (“EventID”,“SessionID”) REFERENCES “Reservations” (“EventID”,“SessionID”) ON UPDATE CASCADE ]”
Table “Reservations” has unique key “EventID”,“SessionID”,“MemberID” while Table “SessionMaster” has Unique key “EventID”,“SessionID”. I also added non-unique indexes “EventID” and “EventID,SessionID”.
Please help