© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
Thomas

Safe to change the way UUIDs are generated for the auth.users `id` column?

Hi, is it safe to create a postgres function (specifically this one: https://gist.github.com/kjmph/5bd772b2c2df145aa645b837da7eca74?permalink_comment_id=4306020#gistcomment-4306020) and set that as the column_default for the
id
id
column in the
auth.users
auth.users
table?

ALTER TABLE "auth"."users" ALTER COLUMN "id" SET DEFAULT 'uuid_generate_v7()';
ALTER TABLE "auth"."users" ALTER COLUMN "id" SET DEFAULT 'uuid_generate_v7()';


Will it even work?
Gist
Postgres PL/pgSQL function for UUID v7 and a bonus custom UUID v8 t...
Postgres PL/pgSQL function for UUID v7 and a bonus custom UUID v8 to support microsecond precision as well. Read more here: https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/ ...
Postgres PL/pgSQL function for UUID v7 and a bonus custom UUID v8 t...
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

Is it safe to expose UUIDs from auth.users to the client?
SupabaseSSupabase / help-and-questions
17mo ago
Can auth.users use v7 UUIDs as ID?
SupabaseSSupabase / help-and-questions
2mo ago
[Question] Best Practice for RLS Key: Using auth.users.id vs supabase_id Column?
SupabaseSSupabase / help-and-questions
8mo ago
How to change the type of my id column
SupabaseSSupabase / help-and-questions
4y ago