Can i use "uniqueIndex" for that?
Hi, I was just wondering if
can be
Best regards, Tristan
export const contactToCompany = pgTable(
"ContactToCompany",
{
contactId: integer().primaryKey()
companyId: integer().primaryKey()
},
(t) => [
index("ContactToCompany_contactId_companyId").on(
t.contactId,
t.companyId,
),
unique("ContactToCompany_contactId_companyId_key").on(
t.contactId,
t.companyId,
),
],
);export const contactToCompany = pgTable(
"ContactToCompany",
{
contactId: integer().primaryKey()
companyId: integer().primaryKey()
},
(t) => [
index("ContactToCompany_contactId_companyId").on(
t.contactId,
t.companyId,
),
unique("ContactToCompany_contactId_companyId_key").on(
t.contactId,
t.companyId,
),
],
);can be
(t) => [
uniqueIndex("ContactToCompany_contactId_companyId").on(
t.contactId,
t.companyId,
),
], (t) => [
uniqueIndex("ContactToCompany_contactId_companyId").on(
t.contactId,
t.companyId,
),
],Best regards, Tristan