prorm API Reference
    Preparing search index...

    Interface TableConstraint

    A constraint declared alongside the table: primary key, unique, check, foreign key or exclusion.

    interface TableConstraint {
        name?: string;
        type: "UNIQUE" | "PRIMARY KEY" | "FOREIGN KEY" | "CHECK";
        fields?: string[];
        references?: {
            table: string;
            field: string | string[];
            onDelete?: string;
            onUpdate?: string;
        };
        check?: string;
    }
    Index
    name?: string
    type: "UNIQUE" | "PRIMARY KEY" | "FOREIGN KEY" | "CHECK"
    fields?: string[]
    references?: {
        table: string;
        field: string | string[];
        onDelete?: string;
        onUpdate?: string;
    }
    check?: string