adonisjs / v5-docs

📚 Source code and documentation for the official docs website.
https://v5-docs.adonisjs.com
88 stars 138 forks source link

Update to mysql2 #179

Closed McSneaky closed 2 years ago

McSneaky commented 2 years ago

🔗 Linked issue

❓ Type of 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

thetutlage commented 2 years ago

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

McSneaky commented 2 years ago

Added: https://github.com/adonisjs/lucid/pull/871

McSneaky commented 2 years ago

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

thetutlage commented 2 years ago

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

RomainLanz commented 2 years ago

Oops, I have done it by myself! 😅