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

Commit d6c9e0d1 by Mick Hansen

chore(schema/bulkCreate): unable to reproduce #2290 with unit test (closes #2290)

1 parent 82d8b26d
...@@ -14,7 +14,7 @@ module.exports = (function() { ...@@ -14,7 +14,7 @@ module.exports = (function() {
}, },
dropSchema: function(tableName, options) { dropSchema: function(tableName, options) {
return QueryGenerator.dropTableQuery(tableName, options); return this.dropTableQuery(tableName, options);
}, },
showSchemasQuery: function() { showSchemasQuery: function() {
......
...@@ -1222,6 +1222,28 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () { ...@@ -1222,6 +1222,28 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
}) })
}) })
it('should support schemas', function () {
var Dummy = this.sequelize.define("Dummy", {
foo : DataTypes.STRING,
bar : DataTypes.STRING
}, {
schema : "space1",
tableName : 'Dummy'
});
return this.sequelize.dropSchema('space1').bind(this).then(function () {
return this.sequelize.createSchema('space1');
}).then(function () {
return Dummy.sync({force: true});
}).then(function () {
return Dummy.bulkCreate([
{foo : "a", bar : "b"},
{foo : "c", bar : "d"}
]);
});
});
if (Support.getTestDialect() !== 'postgres') { if (Support.getTestDialect() !== 'postgres') {
it("should support the ignoreDuplicates option", function(done) { it("should support the ignoreDuplicates option", function(done) {
var self = this var self = this
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!