prorm API Reference
    Preparing search index...

    Interface IndexOptions

    An index to create alongside the table. where produces a partial index, which several engines do not support — see the indexes guide for the matrix.

    interface IndexOptions {
        name?: string;
        fields?: string[] | IndexField[];
        unique?: boolean;
        type?: string;
        using?: string;
        where?: string | WhereOptions<any>;
        tablespace?: string;
        storageParameters?: Record<string, string | number>;
        parser?: string;
        fulltext?: boolean;
        textSearchConfig?: string;
        include?: string[];
        nullsNotDistinct?: boolean;
        expression?: string;
        ifNotExists?: boolean;
    }
    Index
    name?: string
    fields?: string[] | IndexField[]

    Single field name or array of field names for composite indexes

    unique?: boolean
    type?: string
    using?: string
    where?: string | WhereOptions<any>

    Partial-index predicate; see IndexOptions.where in src/dialects/dialect.ts.

    tablespace?: string

    PostgreSQL: specify tablespace for the index

    storageParameters?: Record<string, string | number>

    PostgreSQL: index storage parameters

    parser?: string

    MySQL/MariaDB: parser for full-text index

    fulltext?: boolean

    MySQL/MariaDB: FULLTEXT index

    textSearchConfig?: string

    PostgreSQL: text search configuration for GIN index

    include?: string[]

    PostgreSQL/MySQL: include columns in index (covering index)

    nullsNotDistinct?: boolean

    PostgreSQL/MySQL: index with NULLS NOT DISTINCT

    expression?: string

    Expression-based index (e.g., LOWER(column), (column1 || ' ' || column2))

    ifNotExists?: boolean

    If true, does not throw error if index already exists