Skip to content

postgrelize / IndexOptions

Type Alias: IndexOptions ​

IndexOptions = Readonly<{ concurrently?: boolean; fields?: readonly IndexField[]; ifNotExists?: boolean; include?: readonly string[]; name?: string; nullsNotDistinct?: boolean; operator?: string; unique?: boolean; using?: string; where?: unknown; }>

Defined in: src/ddl/ddl-types.ts:131

Options of addIndex and model indexes (Sequelize v6 IndexesOptions).

Example ​

ts
const options: IndexOptions = {
  fields: ['email'],
  unique: true,
  where: { active: true },
  using: 'btree',
};
await queryInterface.addIndex('users', options);

Released under the MIT License.