$ open source · GPL-3.0 — need a commercial license? imqueue.com →

BaseModel.syncIndices() method

Creates every column index declared on this model.

Signature:

static syncIndices(_options?: SyncOptions): Promise<any>;

Parameters

Parameter

Type

Description

_options

SyncOptions

(Optional) Accepted for symmetry with the other sync methods, not read.

Returns:

Promise<any>

Resolves once every index of this model exists.

Remarks

Reads the declarations left behind by ColumnIndex and NullableIndex and creates them concurrently. A model that declares none resolves immediately — it used to throw, which made this unsafe to call on anything but a model Sequelize.getModelsWithIndices() had already picked out.