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 c3b6e629
authored
Jan 09, 2013
by
Ricardo Graça
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrations: only load files ending in .js from the migrations dir.
1 parent
5fa778ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
.gitignore
lib/migrator.js
.gitignore
View file @
c3b6e62
...
@@ -4,3 +4,4 @@ test*.js
...
@@ -4,3 +4,4 @@ test*.js
.DS_STORE
.DS_STORE
node_modules
node_modules
npm-debug.log
npm-debug.log
*~
lib/migrator.js
View file @
c3b6e62
...
@@ -93,7 +93,9 @@ module.exports = (function() {
...
@@ -93,7 +93,9 @@ module.exports = (function() {
callback
&&
callback
(
null
,
result
)
callback
&&
callback
(
null
,
result
)
}
}
var
migrationFiles
=
fs
.
readdirSync
(
this
.
options
.
path
)
var
migrationFiles
=
fs
.
readdirSync
(
this
.
options
.
path
).
filter
(
function
(
file
)
{
return
/
\.
js$/
.
test
(
file
)
})
var
migrations
=
migrationFiles
.
map
(
function
(
file
)
{
var
migrations
=
migrationFiles
.
map
(
function
(
file
)
{
return
new
Migration
(
self
,
self
.
options
.
path
+
'/'
+
file
)
return
new
Migration
(
self
,
self
.
options
.
path
+
'/'
+
file
)
...
...
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