Skip to content
This repository was archived by the owner on Aug 17, 2022. It is now read-only.

Commit 7720cca

Browse files
authored
added missing format method
1 parent 22ed6a0 commit 7720cca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/migrate.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,10 @@ module.exports = {
817817
return {filename, info};
818818
};
819819

820+
const format = function (i) {
821+
return parseInt(i, 10) < 10 ? '0' + i : i;
822+
};
823+
820824
const getCurrentYYYYMMDDHHmms = function () {
821825
const date = new Date();
822826
return [
@@ -827,7 +831,7 @@ const getCurrentYYYYMMDDHHmms = function () {
827831
format(date.getUTCMinutes()),
828832
format(date.getUTCSeconds())
829833
].join('');
830-
}
834+
};
831835

832836

833837
const executeMigration = function(queryInterface, filename, pos, cb)

0 commit comments

Comments
 (0)