Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit d6c9e0d1
authored
Sep 20, 2014
by
Mick Hansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(schema/bulkCreate): unable to reproduce #2290 with unit test (closes #2290)
1 parent
82d8b26d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletions
lib/dialects/mysql/query-generator.js
test/dao-factory/create.test.js
lib/dialects/mysql/query-generator.js
View file @
d6c9e0d
...
...
@@ -14,7 +14,7 @@ module.exports = (function() {
},
dropSchema
:
function
(
tableName
,
options
)
{
return
QueryGenerator
.
dropTableQuery
(
tableName
,
options
);
return
this
.
dropTableQuery
(
tableName
,
options
);
},
showSchemasQuery
:
function
()
{
...
...
test/dao-factory/create.test.js
View file @
d6c9e0d
...
...
@@ -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'
)
{
it
(
"should support the ignoreDuplicates option"
,
function
(
done
)
{
var
self
=
this
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment