prorm API Reference
    Preparing search index...

    Interface ConstraintDefinition

    An existing constraint as reported by the engine.

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