Adding default values to primary keys

How to make your primary keys auto-generate values in Supabase

  1. Click on the primary key in your table.

  2. Click "Edit column"

  3. Change the column type to uuid

  4. Set the Default Value equal to gen_random_uuid()

  5. Make sure "Is Unique" is toggled on

Last updated

Was this helpful?