`returning` is not supported by mysql
Opened this issue · 4 comments
Package version
9.1.1
Describe the bug
I saw the following 2 codes here,
auth/modules/access_tokens_guard/token_providers/db.ts
Lines 175 to 176 in 016cc8c
auth/modules/session_guard/token_providers/db.ts
Lines 145 to 146 in 016cc8c
It is noticed that the method/function returning('id')
is used there, which is not supported for MySQL by knex itself 12. I know this is for returning an "identifier", but in the previous version (for Adonis v5), there was no identifier and it worked fine.
Is there a fix for this?
Reproduction repo
No response
Footnotes
Hey, it this a MySQL 5.7 related issue? Because we have tests running for MySQL 8 and everything seems to be fine.
The version of MySQL I'm using (more precisely, I'm using MariaDB).
mysql Ver 15.1 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
And I tried the RETURNING query myself and it worked. Honestly, I don't know which part isn't supported, but I've seen documentation and issues related to Knex regarding this matter (as per footnotes).
I am not able to reproduce it. I will recommend creating a failing test in this repo and then I can look into pushing a fix.
I found the issue, @thetutlage! It's because I used UUID (char(36)
) on the access_auth_tokens
table. I switched it to bigint
and it's working fine now. Hopefully UUID will be supported here.