Ā© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
1 reply
Mr Void

declare unique property in `raw_user_meta_data`

Is it possible to declare a property in
raw_user_meta_data
raw_user_meta_data
as unique ?

I wish to make the
username
username
property unique.

I thought about simply making the
public.users.username
public.users.username
field unique and occasionally make a select request to see whether such username is occupied. But if someone fakes a client, they could bypass that step.

šŸ¤” As I'm writing this, Im thinking I should probably setup a trigger that BEFORE the insertion it runs a function that checks whether a user with that username exists. Although not sure if insertion can be cancelled this way.
Is that a possibilty?
image.png
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

RAW_USER_META_DATA
SupabaseSSupabase / help-and-questions
4y ago
new.raw_user_meta_data
SupabaseSSupabase / help-and-questions
4y ago
Delete field from raw_user_meta_data
SupabaseSSupabase / help-and-questions
4y ago
Modifying raw_user_meta_data at registration
SupabaseSSupabase / help-and-questions
8mo ago