Schema Changes

This commit is contained in:
2025-12-06 19:29:28 +01:00
parent 63af22b671
commit 7450f90a0f
7 changed files with 55 additions and 55 deletions

View File

@@ -4,17 +4,17 @@ import { authUsers } from "./auth_users"
export const authTenantUsers = pgTable(
"auth_tenant_users",
{
createdAt: timestamp("created_at", { withTimezone: true })
created_at: timestamp("created_at", { withTimezone: true })
.notNull()
.defaultNow(),
tenantId: bigint("tenant_id", { mode: "number" }).notNull(),
userId: uuid("user_id").notNull(),
tenant_id: bigint("tenant_id", { mode: "number" }).notNull(),
user_id: uuid("user_id").notNull(),
createdBy: uuid("created_by").references(() => authUsers.id),
created_by: uuid("created_by").references(() => authUsers.id),
},
(table) => ({
primaryKey: [table.tenantId, table.userId],
primaryKey: [table.tenant_id, table.user_id],
})
)