Skip to content

Composite foreign key for profiles -> party_member #14

Description

@novacrazy

lantern.party_member already contains a composite primary key of (user_id, party_id), so it would be great to reference that as a composite foreign key in lantern.profiles when user_id and party_id are not-NULL. That way when the party_member entry is deleted, the (if any) per-party profile is also deleted by cascade.

However, profiles.party_id can be NULL for non-party profiles, so I'm currently unsure what exactly that foreign key declaration would look like.

I've found this article as perhaps a starting point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions