Added passkey support
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core"
|
||||
import { boolean, integer, pgTable, text, timestamp } from "drizzle-orm/pg-core"
|
||||
|
||||
export const user = pgTable("user", {
|
||||
id: text("id").primaryKey(),
|
||||
@@ -45,3 +45,17 @@ export const verification = pgTable("verification", {
|
||||
createdAt: timestamp("created_at").$defaultFn(() => new Date()),
|
||||
updatedAt: timestamp("updated_at").$defaultFn(() => new Date())
|
||||
})
|
||||
|
||||
export const passkey = pgTable("passkey", {
|
||||
id: text("id").primaryKey(),
|
||||
name: text("name"),
|
||||
publicKey: text("public_key").notNull(),
|
||||
userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
|
||||
credentialID: text("credential_i_d").notNull(),
|
||||
counter: integer("counter").notNull(),
|
||||
deviceType: text("device_type").notNull(),
|
||||
backedUp: boolean("backed_up").notNull(),
|
||||
transports: text("transports"),
|
||||
createdAt: timestamp("created_at"),
|
||||
aaguid: text("aaguid")
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user