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

Commit 4a0f41c8 by Justin Abene Committed by Sushant

fix(typings): addConstraint (#10634)

1 parent 917b5bdb
...@@ -345,7 +345,7 @@ export class QueryInterface { ...@@ -345,7 +345,7 @@ export class QueryInterface {
public addConstraint( public addConstraint(
tableName: string, tableName: string,
attributes: string[], attributes: string[],
options?: AddConstraintOptions | QueryInterfaceOptions options?: AddConstraintOptions & QueryInterfaceOptions
): Promise<void>; ): Promise<void>;
/** /**
......
...@@ -142,10 +142,11 @@ queryInterface.removeIndex('Person', 'SuperDuperIndex'); ...@@ -142,10 +142,11 @@ queryInterface.removeIndex('Person', 'SuperDuperIndex');
queryInterface.removeIndex('Person', ['firstname', 'lastname']); queryInterface.removeIndex('Person', ['firstname', 'lastname']);
queryInterface.addConstraint('Person', ['firstname', 'lastname'], { queryInterface.sequelize.transaction(trx => queryInterface.addConstraint('Person', ['firstname', 'lastname'], {
name: 'firstnamexlastname', name: 'firstnamexlastname',
type: 'unique', type: 'unique',
}); transaction: trx,
}))
queryInterface.removeConstraint('Person', 'firstnamexlastname'); queryInterface.removeConstraint('Person', 'firstnamexlastname');
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!