Joe Graham
12/01/2020, 7:50 PMitems
and item_versions
(*note: sql server)
create table items {
id int IDENTITY(1,1) constraint items_pkey primary key,
version int not null
}
create table item_versions {
id int IDENTITY(1,1) constraint item_versions_pkey primary key,
item_id int not null,
version int not null,
name nvarchar(15) not null
}
so in the above example i have a 1:* items -> item_versions but I also want to model 1:1 item_versions -> items, how would i model that in my prisma schema?
and what keys would i need to define on the tables to have prisma be able to query that relationship?