Propose changing the `user_metadata` column type from `text` to `jsonb` in the user_metadata table.
Author: nnnLikCreated Mar 30, 2025Updated Nov 7, 2025
Labelsenhancement
Problem
Currently, the user_metadata column is stored as plain text (TEXT type), which:
- Requires parsing/stringifying JSON for every read/write operation. Has worse performance
- Doesn't provide native JSON validation at the database level
Solution
Changing the column type to jsonb would:
- Provide native JSON support in PostgreSQL (As I know, mysql also supports json since v5.7)
- Enable more efficient querying of nested metadata fields
- Allow indexing specific metadata fields if needed
Source: supertokens/supertokens-core