mojaloop / central-ledger

Central Ledger hosted by a scheme to record and settle transfers
Other
33 stars 82 forks source link

Knex migrate rollback failed #284

Open chopoti opened 5 years ago

chopoti commented 5 years ago

Command : npm run migrate:rollback

Response: knex migrate:rollback $npm_package_config_knex

migration file "900100_foreign-keys.js" failed migration failed with error: alter table settlement drop foreign key settlement_currentstatechangeid_foreign - ER_CANT_DROP_FIELD_OR_KEY: Can't DROP 'settlement_currentstatechangeid_foreign'; check that column/key exists Error: ER_CANT_DROP_FIELD_OR_KEY: Can't DROP 'settlement_currentstatechangeid_foreign'; check that column/key exists at Query.Sequence._packetToError (/home/chops/Desktop/TIPS/central-ledger/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14) at Query.ErrorPacket (/home/chops/Desktop/TIPS/central-ledger/node_modules/mysql/lib/protocol/sequences/Query.js:77:18) at Protocol._parsePacket (/home/chops/Desktop/TIPS/central-ledger/node_modules/mysql/lib/protocol/Protocol.js:278:23) at Parser.write (/home/chops/Desktop/TIPS/central-ledger/node_modules/mysql/lib/protocol/Parser.js:76:12) at Protocol.write (/home/chops/Desktop/TIPS/central-ledger/node_modules/mysql/lib/protocol/Protocol.js:38:16) at Socket. (/home/chops/Desktop/TIPS/central-ledger/node_modules/mysql/lib/Connection.js:91:28) at Socket. (/home/chops/Desktop/TIPS/central-ledger/node_modules/mysql/lib/Connection.js:502:10) at Socket.emit (events.js:198:13) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at Socket.Readable.push (_stream_readable.js:224:10) at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

at Protocol._enqueue (/home/chops/Desktop/TIPS/central-ledger/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Connection.query (/home/chops/Desktop/TIPS/central-ledger/node_modules/mysql/lib/Connection.js:200:25)
at /home/chops/Desktop/TIPS/central-ledger/node_modules/knex/lib/dialects/mysql/index.js:144:18
at Promise._execute (/home/chops/Desktop/TIPS/central-ledger/node_modules/bluebird/js/release/debuggability.js:313:9)
at Promise._resolveFromExecutor (/home/chops/Desktop/TIPS/central-ledger/node_modules/bluebird/js/release/promise.js:483:18)
at new Promise (/home/chops/Desktop/TIPS/central-ledger/node_modules/bluebird/js/release/promise.js:79:10)
at Client_MySQL._query (/home/chops/Desktop/TIPS/central-ledger/node_modules/knex/lib/dialects/mysql/index.js:135:12)
at Client_MySQL.query (/home/chops/Desktop/TIPS/central-ledger/node_modules/knex/lib/client.js:192:17)
at /home/chops/Desktop/TIPS/central-ledger/node_modules/knex/lib/transaction.js:231:21
at tryCatcher (/home/chops/Desktop/TIPS/central-ledger/node_modules/bluebird/js/release/util.js:16:23)
at Function.Promise.attempt.Promise.try (/home/chops/Desktop/TIPS/central-ledger/node_modules/bluebird/js/release/method.js:39:29)
at Client_MySQL.trxClient.query (/home/chops/Desktop/TIPS/central-ledger/node_modules/knex/lib/transaction.js:228:33)
at Runner.<anonymous> (/home/chops/Desktop/TIPS/central-ledger/node_modules/knex/lib/runner.js:138:36)
at Runner.tryCatcher (/home/chops/Desktop/TIPS/central-ledger/node_modules/bluebird/js/release/util.js:16:23)
at Runner.query (/home/chops/Desktop/TIPS/central-ledger/node_modules/bluebird/js/release/method.js:15:34)
at Runner.<anonymous> (/home/chops/Desktop/TIPS/central-ledger/node_modules/knex/lib/runner.js:206:19)

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @mojaloop/central-ledger@6.2.5 migrate:rollback: knex migrate:rollback $npm_package_config_knex npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @mojaloop/central-ledger@6.2.5 migrate:rollback script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/chops/.npm/_logs/2019-05-31T07_59_22_110Z-debug.log

elnyry-sam-k commented 5 years ago

@chopoti , if this a bug you'd like to report, please use this - https://github.com/mojaloop/project/issues/new/choose , then select Bug Report and fill the information out. That helps the developer or whoever is debugging the issue have enough information and save time in async communication.. However for this one, instead of creating a new one, you can just copy+paste that format here into this one and fill out the details.

Thanks..