[PR #2636] [CLOSED] Support postgres array types #4415

Closed
opened 2026-03-13 11:45:22 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2636
Author: @JeremyMoeglich
Created: 5/13/2025
Status: Closed

Base: mainHead: main


📝 Commits (2)

📊 Changes

1 file changed (+37 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/db/get-migration.ts (+37 -1)

📄 Description

I have a custom plugin with a string[] type and that resulted in a warning despite me using a postgres array type.

2025-05-13 10:26:10.237 WARN  servercode/src/lib/auth/auth.ts:107 Field roles in table user has a different type in the database. Expected string[] but got _text.

Looking at the code it only allowed json previously, this is a small patch that adds various array types into the check.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/2636 **Author:** [@JeremyMoeglich](https://github.com/JeremyMoeglich) **Created:** 5/13/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`02d064a`](https://github.com/better-auth/better-auth/commit/02d064afaaf5cb503b7d3f17967025713b72f787) Support postgres array types - [`53a7678`](https://github.com/better-auth/better-auth/commit/53a76780fb967c19fb889d922470c57ba1350648) Format changes ### 📊 Changes **1 file changed** (+37 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/db/get-migration.ts` (+37 -1) </details> ### 📄 Description I have a custom plugin with a string[] type and that resulted in a warning despite me using a postgres array type. ``` 2025-05-13 10:26:10.237 WARN servercode/src/lib/auth/auth.ts:107 Field roles in table user has a different type in the database. Expected string[] but got _text. ``` Looking at the code it only allowed json previously, this is a small patch that adds various array types into the check. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 11:45:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#4415