feat: allow associating an existing device ID and token with a username
This commit is contained in:
@@ -11,7 +11,9 @@ export const deviceTokensTable = sqliteTable("device_tokens", {
|
||||
token: text("token").notNull().unique(),
|
||||
username: text("username"),
|
||||
/** Used to determine if a device hasn't been used in a while. Should start to ignore tokens where the device hasn't connected in about a month. */
|
||||
lastConnectedAt: text("last_connected_at").default(sql`(CURRENT_TIMESTAMP)`),
|
||||
lastConnectedAt: text("last_connected_at")
|
||||
.default(sql`(CURRENT_TIMESTAMP)`)
|
||||
.$onUpdate(() => sql`(CURRENT_TIMESTAMP)`),
|
||||
});
|
||||
|
||||
export const watchStatusTable = sqliteTable(
|
||||
|
||||
Reference in New Issue
Block a user