Issue with custom table names

I've added such custom table names so it matches my db schema:
user: {
    deleteUser: {
      enabled: true
    },
    fields: {
      createdAt: 'created_at',
      updatedAt: 'updated_at',
      emailVerified: 'email_verified',
      normalized_email: 'normalized_email',
      banReason: 'ban_reason',
      banExpires: 'ban_expires'
    }
  },
  account: {
    fields: {
      accountId: 'account_id',
      providerId: 'provider_id',
      userId: 'user_id',
      accessToken: 'access_token',
      refreshToken: 'refresh_token',
      idToken: 'id_token',
      accessTokenExpiresAt: 'access_token_expires_at',
      refreshTokenExpiresAt: 'refresh_token_expires_at',
      createdAt: 'created_at',
      updatedAt: 'updated_at'
    }
  },
  verification: {
    fields: {
      expiresAt: 'expires_at',
      createdAt: 'created_at',
      updatedAt: 'updated_at'
    }
  }


And I've found an issue:
when I run npx @better-auth/cli generate it generates me such migration file:
alter table "user" add column "banReason" text;

alter table "user" add column "banExpires" timestamp;

alter table "user" add column "normalizedEmail" text unique;

So the issue here is that it wants to create columns with camelCase, even though I indicated I want them snake_case (banReason: 'ban_reason' -> ban_reason: 'ban_reason' didn't help neither)
Was this page helpful?