Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update use of primaryKey away from deprecated in rqb.mdx #265

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/content/documentation/docs/rqb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ export const profileInfo = pgTable('profile_info', {

### Foreign key actions

for more information check [posrgres foreign keys docs](https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK)
for more information check the [Postgres foreign keys docs](https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK)

You can specify actions that should occur when the referenced data in the parent table is modified. These actions are known as "foreign key actions." PostgreSQL provides several options for these actions.

Expand Down Expand Up @@ -505,7 +505,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