clxxiii
DTDrizzle Team
•Created by kal on 4/11/2024 in #help
How to reference composite key in foreign key
oh yea i knew I forgot something:
Just like with a single foreign key, you have to make sure that only one row in the table can have that value (unique)
With a composite foreign key, you need to make sure there is no row that could share, in your case, both the game id and the turn. (composite unique)
Look to the docs for more information:
6 replies
DTDrizzle Team
•Created by kal on 4/11/2024 in #help
How to reference composite key in foreign key
I'm not totally sure, (ie dont copy and paste this in) but hopefully something like this points you in the right direction
have not tested this snippet either
6 replies