From f6d1249196f1072f94132961285dfc568e3987f6 Mon Sep 17 00:00:00 2001 From: baozhoutao Date: Mon, 9 Mar 2020 18:08:57 +0800 Subject: [PATCH] Update index.js --- packages/migrate/index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/migrate/index.js b/packages/migrate/index.js index ed13cbe022..f22bd2cfa5 100644 --- a/packages/migrate/index.js +++ b/packages/migrate/index.js @@ -4,6 +4,8 @@ var path = require('path'); var stateStore = path.join(process.cwd(), '.migrate'); var migrationsDirectory = path.join(__dirname, 'migrations'); +// let Fiber = require('fibers'); + const up = async function() { migrate.load({ @@ -45,8 +47,23 @@ const down = async function() { }) } +// const upSync = function(){ +// Fiber(function(){ +// let fiber = Fiber.current; +// up.then(result => { +// fiber.run(); +// }).catch(result => { +// console.error(result) +// fiber.run(); +// }) +// Fiber.yield(); +// }).run(); +// } + + module.exports = { init: init, up: up, + // upSync: upSync, down: down } \ No newline at end of file