Add column to PK
gabor gollnhofer 2 years ago • updated by hannah gryska 7 months ago • 4
I've imported an existing schema that didn't have any PK or FK set though the columns are there.
How should I "promote" a column to be a PK column?
And how to add the FKs to use the existing columns?
Customer support service by UserEcho
To add PK just drag the column to the top area of the table.
To use those PK as FK in another table drag the "thingy" (i don't know what to call it) that shows up on the down right corner of the selected table to the child table. It will create new columns.
If the columns you wanted to use already existed then click on the newly created relation (the line), go to the rolename section and make it so it uses the old columns
Thanks! It works great!
First of all, when adding a new Field, the PK needs to be default only for the first entry, for the rest of the fields, turn it off by default. There should be a way with a popup to turn the field into a PK, FK or nothing. If it's a FK, you should be able to type int Table.Field what it maps to or drag and drop it on another field so it can make the connection for you. The way it's setup right now is to wonky.
Thank you for your comment here. I will pass this feedback along to the Product team.