chore: mark lastRefreshAt field as deprecated in userCredit schema
This commit is contained in:
parent
2d0392db61
commit
33fe00b8dc
@ -147,7 +147,6 @@ export async function addCredits({
|
||||
.update(userCredit)
|
||||
.set({
|
||||
currentCredits: newBalance,
|
||||
// lastRefreshAt: new Date(), // NOTE: we can not update this field here
|
||||
updatedAt: new Date(),
|
||||
})
|
||||
.where(eq(userCredit.userId, userId));
|
||||
@ -158,7 +157,6 @@ export async function addCredits({
|
||||
id: randomUUID(),
|
||||
userId,
|
||||
currentCredits: newBalance,
|
||||
// lastRefreshAt: new Date(), // NOTE: we can not update this field here
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
});
|
||||
|
@ -94,7 +94,7 @@ export const userCredit = pgTable("user_credit", {
|
||||
id: text("id").primaryKey(),
|
||||
userId: text("user_id").notNull().references(() => user.id, { onDelete: 'cascade' }),
|
||||
currentCredits: integer("current_credits").notNull().default(0),
|
||||
lastRefreshAt: timestamp("last_refresh_at"),
|
||||
lastRefreshAt: timestamp("last_refresh_at"), // deprecated
|
||||
createdAt: timestamp("created_at").notNull().defaultNow(),
|
||||
updatedAt: timestamp("updated_at").notNull().defaultNow(),
|
||||
}, (table) => ({
|
||||
|
Loading…
Reference in New Issue
Block a user