exports.up = function(knex, Promise) { return Promise.all([ knex.schema .createTable('planex_transacciones', function(table) { table.increments(); table.string('archivoRecibido', 1024); table.string('archivoEnviado', 1024); // 0: insertado, 1 enviado table.integer('estado'); table.string('apies'); table.string('GLN'); }) .table('PMAEFACT_TEMP', function(table) { table.string('GLN'); table.bigInteger('idTransaccion'); }) .table('PMOVFACT_TEMP', function(table) { table.string('GLN'); table.bigInteger('codigoBarras'); }) ]); }; exports.down = function(knex, Promise) { return Promise.all([ knex.schema .dropTable('planex_transacciones') .table('PMAEFACT_TEMP', function(table) { table.dropColumns('GLN', 'idTransaccion'); }) ]); };