Skip to content

Commit

Permalink
chore: update use of primaryKey away from deprecated in rqb.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
kasbah committed Apr 5, 2024
1 parent 2bdd54e commit 1eefa64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/content/documentation/docs/rqb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export const usersToGroups = pgTable('users_to_groups', {
userId: integer('user_id').notNull().references(() => users.id),
groupId: integer('group_id').notNull().references(() => groups.id),
}, (t) => ({
pk: primaryKey(t.userId, t.groupId),
pk: primaryKey({ columns: [t.userId, t.groupId] }),
}),
);

Expand Down Expand Up @@ -498,7 +498,7 @@ await db.query.users.findMany(...);
userId: integer('user_id').notNull().references(() => users.id),
groupId: integer('group_id').notNull().references(() => groups.id),
}, (t) => ({
pk: primaryKey(t.userId, t.groupId),
pk: primaryKey({ columns: [t.userId, t.groupId] }),
}));

export const usersToGroupsRelations = relations(usersToGroups, ({ one }) => ({
Expand Down

0 comments on commit 1eefa64

Please sign in to comment.