update backend for appleauth

This commit is contained in:
2024-10-09 10:27:12 -05:00
parent cbdca78f18
commit 171de4104d
16 changed files with 57 additions and 632 deletions

View File

@@ -19,14 +19,11 @@ export const users = createTable(
"user",
{
id: serial("id").primaryKey(),
username: varchar("username", { length: 50 }).unique().notNull(),
email: varchar("email", { length: 255 }).unique().notNull(),
passwordHash: varchar("password_hash", {length: 255}).notNull(),
name: varchar("name", { length: 100 }),
appleId: varchar("apple_id", { length: 255 }).unique(),
appleEmail: varchar("apple_email", { length: 255 }).unique().notNull(),
fullName: varchar("full_name", { length: 100 }),
pfpURL: varchar("pfp_url", { length: 255 }),
pushToken: varchar("pushToken", { length: 255 }),
refreshToken: varchar("refreshToken", { length: 255 }),
lastLogin: timestamp("last_login", { withTimezone: true }),
createdAt: timestamp("created_at", { withTimezone: true })
.default(sql`CURRENT_TIMESTAMP`)
.notNull(),