Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Knex migrate rollback failed #284

Open
chopoti opened this issue May 31, 2019 · 1 comment
Open

Knex migrate rollback failed #284

chopoti opened this issue May 31, 2019 · 1 comment

Comments

@chopoti
Copy link

chopoti commented May 31, 2019

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. (/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. (/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/[email protected] migrate:rollback: knex migrate:rollback $npm_package_config_knex
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @mojaloop/[email protected] 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
Copy link
Member

@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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants