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 ada11189
authored
Jan 04, 2014
by
Mick Hansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sqlite supports DEFAULT VALUES
1 parent
6cacda3b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
lib/dialects/sqlite.js
test/dao-factory/create.test.js
lib/dialects/sqlite.js
View file @
ada1118
...
...
@@ -6,7 +6,8 @@ var SqliteDialect = function(sequelize) {
}
SqliteDialect
.
prototype
.
supports
=
_
.
extend
(
Abstract
.
prototype
.
supports
,
{
'DEFAULT'
:
false
'DEFAULT'
:
false
,
'DEFAULT VALUES'
:
true
})
module
.
exports
=
SqliteDialect
\ No newline at end of file
test/dao-factory/create.test.js
View file @
ada1118
...
...
@@ -598,7 +598,18 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
it
(
'should allow blank creates (with timestamps: false)'
,
function
(
done
)
{
var
Worker
=
this
.
sequelize
.
define
(
'Worker'
,
{},
{
timestamps
:
false
})
Worker
.
sync
().
done
(
function
(
err
)
{
Worker
.
create
().
done
(
function
(
err
,
worker
)
{
Worker
.
create
({},
{
fields
:
[]}).
done
(
function
(
err
,
worker
)
{
expect
(
err
).
not
.
to
.
be
.
ok
expect
(
worker
).
to
.
be
.
ok
done
()
})
})
})
it
(
'should allow truly blank creates'
,
function
(
done
)
{
var
Worker
=
this
.
sequelize
.
define
(
'Worker'
,
{},
{
timestamps
:
false
})
Worker
.
sync
().
done
(
function
(
err
)
{
Worker
.
create
({},
{
fields
:
[]}).
done
(
function
(
err
,
worker
)
{
expect
(
err
).
not
.
to
.
be
.
ok
expect
(
worker
).
to
.
be
.
ok
done
()
...
...
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