Skip to content

[Feature]: Support composite foreign keys when editing table definition in the UI #4100

Open

Description

@TomReddington

Describe the new feature

Hello,

SQLite supports composite foreign keys if the destination table's columns form a composite key or have a uniqueness constraint applied.

When creating a table through the UI, I'm surprised that I can't set up this relationship, and can only choose single columns when creating a foreign key, especially when I can pick multiple columns from my source table.

It would be nice to support this in the UI, and to not be misleading when editing an existing composite foreign key relationship in the UI.

My screenshots use version 3.13.1 on Windows.

Thanks.

Does this feature exist in another product or project? Please provide a link

No response

Do you have a screenshot? Please add screenshots to help explain your idea.

Creating a Parent table (all fine here):

Image

Creating a Child table and attempting to add a composite foreign key, but you can only pick one column:

Image

Editing a Child table that was created with a composite foreign key through SQL, where it gets in a muddle on editing:

Image

Activity

  1. lilygthb commented on Sep 10, 2026

    @lilygthb

    I was going mad thinking I didn't know how to do this, but it looks like it's a missing feature or a bug...

    basically it's not possible to use the GUI to achieve something like that:

    FOREIGN KEY (parent_key1, parent_key2) REFERENCES parent_table(key1, key2)
    
    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions