refactor: update name

This commit is contained in:
Mauricio Siu
2025-02-10 02:13:52 -06:00
parent b7112b89fd
commit 6179cef1ee
16 changed files with 249 additions and 446 deletions

View File

@@ -7,7 +7,7 @@ export const account = pgTable("account", {
providerId: text("provider_id").notNull(),
userId: text("user_id")
.notNull()
.references(() => user.id),
.references(() => user.userId),
accessToken: text("access_token"),
refreshToken: text("refresh_token"),
idToken: text("id_token"),
@@ -42,7 +42,7 @@ export const organization = pgTable("organization", {
metadata: text("metadata"),
ownerId: text("owner_id")
.notNull()
.references(() => user.id),
.references(() => user.userId),
});
export const member = pgTable("member", {
@@ -52,7 +52,7 @@ export const member = pgTable("member", {
.references(() => organization.id),
userId: text("user_id")
.notNull()
.references(() => user.id),
.references(() => user.userId),
role: text("role").notNull(),
createdAt: timestamp("created_at").notNull(),
});
@@ -68,5 +68,5 @@ export const invitation = pgTable("invitation", {
expiresAt: timestamp("expires_at").notNull(),
inviterId: text("inviter_id")
.notNull()
.references(() => user.id),
.references(() => user.userId),
});