In public I have a table called "decks". Now I am ...
# help
p
In public I have a table called "decks". Now I am trying to create another table there called "cards" that references "decks":
Copy code
create table cards (
  id uuid default uuid_generate_v4(),
  deck_id uuid references public.decks.id on delete cascade,
  created_at timestamp with time zone default CURRENT_DATE,
  front text not null,
  back text not null,
  primary key (id)
);
However when I run this query, supabase tells me:
cross-database references are not implemented: "public.decks.id"
What does this mean?
s
You only need the table name, you don't need to specify the id field.
p
oh, but how does it relate the 2 tables to each other?
s
By the table's primary key
p
ah got it
thanks!