Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
les
gancio
Commits
5fa8bc5a
Commit
5fa8bc5a
authored
Oct 02, 2019
by
les
Browse files
[fix] manage db migrations
parent
a743281e
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/cli.js
View file @
5fa8bc5a
...
...
@@ -193,15 +193,16 @@ async function upgrade (options) {
const
umzug
=
new
Umzug
({
storage
:
'
sequelize
'
,
storageOptions
:
{
sequelize
:
db
},
logging
:
consola
.
info
,
migrations
:
{
wrap
:
fun
=>
{
return
()
=>
fun
(
db
.
queryInterface
,
Sequelize
).
catch
(
()
=>
false
)
return
()
=>
fun
(
db
.
queryInterface
,
Sequelize
).
catch
(
e
=>
{
consola
.
error
(
e
);
return
false
;
}
)
},
path
:
path
.
resolve
(
__dirname
,
'
migrations
'
)
}
})
const
migrations
=
await
umzug
.
up
()
db
.
close
()
await
umzug
.
up
()
return
await
db
.
close
()
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
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 comment