How do I add a foreign key in SequelPro?

You can either declare your table completely in SQL, and just add it that way.

Or you can declare the columns in the table so that it is defined. Then select the table and click on Relations. Using the + at the end of the screen will allow you to specify a table and column and if you want cascade behaviour on the update/delete.

The image below may help orient you, it’s a bit crude but hopefully shows you where to click.

enter image description here

Leave a Comment