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

db-migrate-mysql.connect(): do not pass driver option on to mysql.createConnection() #45

Closed
jfalch opened this issue Feb 11, 2023 · 1 comment

Comments

@jfalch
Copy link

jfalch commented Feb 11, 2023

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

warning message when running db-migrate up: "Ignoring invalid configuration option passed to Connection: driver. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection"

patched according to db-migrate/node-db-migrate#753 (comment)

Here is the diff that solved my problem:

diff --git a/node_modules/db-migrate-mysql/index.js b/node_modules/db-migrate-mysql/index.js
index 0c4460d..66841e4 100644
--- a/node_modules/db-migrate-mysql/index.js
+++ b/node_modules/db-migrate-mysql/index.js
@@ -500,6 +500,7 @@ function dummy () {
 
 exports.connect = function (config, intern, callback) {
   let db;
+  delete config.driver;
 
   internals = intern;
   log = internals.mod.log;

This issue body was partially generated by patch-package.

@wzrdtales
Copy link
Member

closed as of #41 instead

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