Skip to content

Support multiple FOREIGN KEY #665

Description

@matiasmorant

column employee.department refers to department.id and
column employee.boss refers to bosses.id

so table employee has 2 FOREIGN keys:

CREATE TABLE employee (
    id TEXT,
    department TEXT,
    boss TEXT,
    FOREIGN KEY(department) REFERENCES department(id) ON UPDATE RESTRICT ON DELETE CASCADE,
    FOREIGN KEY(boss) REFERENCES boss(id) ON UPDATE RESTRICT ON DELETE CASCADE
)

but only 1 FOREIGN KEY is supported, and I'm hitting

raise AttributeError("'Query' object already has attribute foreign_key")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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