CREATE TABLE public.users (
id uuid PRIMARY KEY,
user_id uuid REFERENCES auth.users (id) UNIQUE,
email text REFERENCES auth.users (email) UNIQUE,
created_at timestamp with time zone REFERENCES auth.users (created_at),
updated_at timestamp with time zone REFERENCES auth.users (updated_at)
);
ERROR: 42830: there is no unique constraint matching given keys for referenced table "users"
CREATE TABLE public.users (
id uuid PRIMARY KEY,
user_id uuid REFERENCES auth.users (id) UNIQUE,
email text REFERENCES auth.users (email) UNIQUE,
created_at timestamp with time zone REFERENCES auth.users (created_at),
updated_at timestamp with time zone REFERENCES auth.users (updated_at)
);
ERROR: 42830: there is no unique constraint matching given keys for referenced table "users"