不要怂,就是干,撸起袖子干!

Commit 5412adea by Simon Schick Committed by GitHub

fix(typings): types for addIndex (#10844)

1 parent 8d1972f6
......@@ -124,16 +124,16 @@ export interface QueryInterfaceDropAllTablesOptions extends QueryInterfaceOption
}
export interface QueryInterfaceIndexOptions extends QueryInterfaceOptions {
indicesType?: 'UNIQUE' | 'FULLTEXT' | 'SPATIAL';
type?: 'UNIQUE' | 'FULLTEXT' | 'SPATIAL';
/** The name of the index. Default is __ */
indexName?: string;
name?: string;
/** For FULLTEXT columns set your parser */
parser?: string;
/** Set a type for the index, e.g. BTREE. See the documentation of the used dialect */
indexType?: string;
using?: string;
}
export interface AddUniqueConstraintOptions {
......
......@@ -132,8 +132,8 @@ queryInterface.addIndex('Person', ['firstname', 'lastname']);
// - indexType: Set a type for the index, e.g. BTREE. See the documentation of the used dialect
// - logging: A function that receives the sql query, e.g. console.log
queryInterface.addIndex('Person', ['firstname', 'lastname'], {
indexName: 'SuperDuperIndex',
indicesType: 'UNIQUE',
name: 'SuperDuperIndex',
type: 'UNIQUE',
});
queryInterface.removeIndex('Person', 'SuperDuperIndex');
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!