Update to mysql2
🔗 Linked issue
❓ Type of change
- [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
- [x] 👌 Enhancement (improving an existing functionality like performance)
- [ ] ✨ New feature (a non-breaking change that adds functionality)
- [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
📚 Description
Updating to mysql2 allows to use MySQL 8 and above. There's been issue opened in mysql repo, but seems like it's stale https://github.com/mysqljs/mysql/issues/1959
mysql2 is API compatible with mysql so there really shouldn't be any breaking changes
📝 Checklist
- [ ] I have linked an issue or discussion.
- [x] I have updated the documentation accordingly.
Cool. Can you please also send a PR for the Lucid repo. We have to update the client inside the config file to mysql2 and also install mysql2 dialect.
https://github.com/adonisjs/lucid/blob/develop/templates/database.txt#L72 https://github.com/adonisjs/lucid/blob/develop/instructions.ts#L82
Added: https://github.com/adonisjs/lucid/pull/871
Is there need for another dialect tho? Since it's drop in replacement and seems to be already added https://github.com/adonisjs/lucid/blob/5d006b8013c415a53d0b250dc9de59c473cf1fcd/src/Dialects/index.ts#L21
Is there need for another dialect tho? Since it's drop in replacement and seems to be already added
Oh yeah, I changed that to see if all of our tests are green. If yes, then we can use mysql2 in tests and also recommend it as the default dialect
Oops, I have done it by myself! 😅