Skip to content

Addresses

Table: public.addresses

Columns

Column Type Default Description
id uuid PK UUID
user_id uuid FK → profiles(id) Owner
label text 'Home' e.g. Home, Work
recipient_name text nullable Delivery name
phone text nullable Contact
street text NOT NULL Street address
city text NOT NULL
state text nullable Region/state
country text NOT NULL
postal_code text nullable
latitude float8 nullable GPS
longitude float8 nullable GPS
is_default boolean false Default flag
created_at timestamptz now()
updated_at timestamptz now()

Indexes

  • idx_addresses_user_id on user_id

RLS

  • Owner: full CRUD
  • Admin: read all