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

Commit f3327436 by Trey Thomas

Add failing integration test for removing a column that has a foreign key constraint

1 parent ef7793b8
Showing with 15 additions and 0 deletions
......@@ -560,6 +560,13 @@ describe(Support.getTestDialectTeaser('QueryInterface'), function() {
},
lastName: {
type: DataTypes.STRING
},
manager: {
type: DataTypes.INTEGER,
references: {
model: 'users',
key: 'id'
}
}
});
});
......@@ -579,6 +586,14 @@ describe(Support.getTestDialectTeaser('QueryInterface'), function() {
expect(table).to.not.have.property('lastName');
});
});
it('should be able to remove a column with a foreign key constraint', function() {
return this.queryInterface.removeColumn('users', 'manager').bind(this).then(function() {
return this.queryInterface.describeTable('users');
}).then(function(table) {
expect(table).to.not.have.property('manager');
});
});
});
describe('(with a schema)', function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!