Hi! I'm glad to use Lucia instead of NextAuth anyway I'm a newbie to Lucia.
Context
First, I was facing an issue of Unknown column \'user_id\' when confirming GitHub oauth behavior.
I found out my session table has userId instead of user_id.
In my project, the database schema is generated by prisma-kysely for PlanetScale. Then I prepared an adapter using @lucia-auth/adapter-mysql.
Package
@lucia-auth/adapter-mysql
Description
Hi! I'm glad to use Lucia instead of NextAuth anyway I'm a newbie to Lucia.
Context
First, I was facing an issue of
Unknown column \'user_id\'
when confirming GitHub oauth behavior. I found out my session table hasuserId
instead ofuser_id
. In my project, the database schema is generated by prisma-kysely for PlanetScale. Then I prepared an adapter using@lucia-auth/adapter-mysql
.Suggestion
This supports to definition of table names by constractor. https://github.com/lucia-auth/lucia/blob/b7f1800b5fce76aa92a9e857d39a33b26fdf6f44/packages/adapter-mysql/src/base.ts#L17-L18 As same this, it is comfortable to integrate database if it will be able to define column names.
or
I'd be happy if it had an option that it's like a flag to switch camelCase or snake_case for columns.
Thanks.