postgrelize / IndexOptions
Type Alias: IndexOptions ​
IndexOptions =
Readonly<{concurrently?:boolean;fields?: readonlyIndexField[];ifNotExists?:boolean;include?: readonlystring[];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);