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

Commit 914ff3e

Browse files
committed
Actually fix this time
1 parent 8e7e785 commit 914ff3e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/migrate.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -538,9 +538,9 @@ const parseDifference = function(previousState, currentState)
538538

539539

540540
function shuffleArray(array) {
541-
for (var i = array.length - 1; i > 0; i--) {
542-
var j = Math.floor(Math.random() * (i + 1));
543-
var temp = array[i];
541+
for (let i = array.length - 1; i > 0; i--) {
542+
let j = Math.floor(Math.random() * (i + 1));
543+
let temp = array[i];
544544
array[i] = array[j];
545545
array[j] = temp;
546546
}
@@ -760,7 +760,7 @@ let res = `{ fn: "removeIndex", params: [
760760

761761
const writeMigration = function(revision, migration, migrationsDir, name = '', comment = '')
762762
{
763-
let _commands = "var migrationCommands = [ \n" + migration.commandsUp.join(", \n") +' \n];\n';
763+
let _commands = "let migrationCommands = [ \n" + migration.commandsUp.join(", \n") +' \n];\n';
764764
let _actions = ' * ' + migration.consoleOut.join("\n * ");
765765

766766
_commands = beautify(_commands);
@@ -773,7 +773,7 @@ const writeMigration = function(revision, migration, migrationsDir, name = '', c
773773

774774
let template = `'use strict';
775775
776-
var Sequelize = require('sequelize');
776+
let Sequelize = require('sequelize');
777777
778778
/**
779779
* Actions summary:
@@ -782,15 +782,15 @@ ${_actions}
782782
*
783783
**/
784784
785-
var info = ${JSON.stringify(info, null, 4)};
785+
let info = ${JSON.stringify(info, null, 4)};
786786
787787
${_commands}
788788
789789
module.exports = {
790790
pos: 0,
791791
up: function(queryInterface, Sequelize)
792792
{
793-
var index = this.pos;
793+
let index = this.pos;
794794
return new Promise(function(resolve, reject) {
795795
function next() {
796796
if (index < migrationCommands.length)

0 commit comments

Comments
 (0)