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 d6329d48
authored
Feb 04, 2014
by
Sascha Depold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for #525
1 parent
638ed26d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletions
test/assets/migrations/20111117063700-createPerson.cs
test/migrator.test.js
test/assets/migrations/20111117063700-createPerson.cs
0 → 100644
View file @
d6329d4
module
.
exports
=
{
up
:
function
(
migration
,
DataTypes
,
done
)
{
migration
.
createTable
(
'
Person
'
,
{
name
:
DataTypes
.
STRING
,
isBetaMember
:
{
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
false
,
allowNull
:
false
}
})
.
complete
(
done
)
},
down
:
function
(
migration
,
DataTypes
,
done
)
{
migration
.
dropTable
(
'
Person
'
).
complete
(
done
)
}
}
test/migrator.test.js
View file @
d6329d4
...
...
@@ -28,6 +28,19 @@ describe(Support.getTestDialectTeaser("Migrator"), function() {
})
describe
(
'getUndoneMigrations'
,
function
()
{
it
(
"supports coffee files"
,
function
(
done
)
{
this
.
init
({
filesFilter
:
/
\.
cs$/
,
to
:
20111130161100
},
function
(
migrator
)
{
migrator
.
getUndoneMigrations
(
function
(
err
,
migrations
)
{
expect
(
err
).
to
.
be
.
null
expect
(
migrations
).
to
.
have
.
length
(
1
)
done
()
})
})
})
it
(
"returns no files if timestamps are after the files timestamp"
,
function
(
done
)
{
this
.
init
({
from
:
20140101010101
},
function
(
migrator
)
{
migrator
.
getUndoneMigrations
(
function
(
err
,
migrations
)
{
...
...
@@ -309,7 +322,7 @@ describe(Support.getTestDialectTeaser("Migrator"), function() {
})
})
})
if
(
dialect
.
match
(
/^postgres/
))
{
describe
(
'function migrations'
,
function
()
{
...
...
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