Skip to content
Discussion options

You must be logged in to vote

Hi @diraneyya. Linking these two tables is definitely possible in Mathesar! Let me show you a few ways.

First, a point of clarification. To link two tables, the foreign key does not need to reference a primary key. As long as the ip_address column on the referenced table (Geolocation, in your example) is both UNIQUE and NOT NULL, it can be used to define a foreign key relationship, even if it's a TEXT column.

Mathesar lets you create a relationship in two ways:

  1. With the "Create a relationship" button, which will create a new column for you (it looks like you may have done this based on the last "Geolocation" column of your routing table).
  2. By adding new foreign key constraints in the Tabl…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@diraneyya
Comment options

@zackkrida
Comment options

@diraneyya
Comment options

@zackkrida
Comment options

@seancolsen
Comment options

Answer selected by diraneyya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants