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

Commit 4a0f41c8 by Justin Abene Committed by Sushant

fix(typings): addConstraint (#10634)

1 parent 917b5bdb
......@@ -345,7 +345,7 @@ export class QueryInterface {
public addConstraint(
tableName: string,
attributes: string[],
options?: AddConstraintOptions | QueryInterfaceOptions
options?: AddConstraintOptions & QueryInterfaceOptions
): Promise<void>;
/**
......
......@@ -142,10 +142,11 @@ queryInterface.removeIndex('Person', 'SuperDuperIndex');
queryInterface.removeIndex('Person', ['firstname', 'lastname']);
queryInterface.addConstraint('Person', ['firstname', 'lastname'], {
queryInterface.sequelize.transaction(trx => queryInterface.addConstraint('Person', ['firstname', 'lastname'], {
name: 'firstnamexlastname',
type: 'unique',
});
transaction: trx,
}))
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!