Adding default values to primary keys
Make a Supabase primary key auto-generate values. Edit the column, set its type to uuid and its default value to gen_random_uuid(), and turn on Is Unique.
-
Click on the primary key in your table.
-
Click "Edit column"

-
Change the column type to uuid
-
Set the Default Value equal to
gen_random_uuid()
-
Make sure "Is Unique" is toggled on
