You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export const **users** = pgTable('users', {
id: serial('id').primaryKey(),
followers: integer('followers'),
following: integer('following'),
});
export const usersRelations = relations(users, ({ many }) => ({
**following**: many(users, {
relationName: 'following', <- was requested by orm errors but does not work
}),
**followers**: many(users,{
relationName: 'followers', <- also does not work
}),
}));
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
summarized code:
Beta Was this translation helpful? Give feedback.
All reactions