refactor: remove unused file, update timestamps on query views and views
- Deleted the unused file `src/auth/drizzle/one.ts`. - Modified `updatedAt` field in `src/db/drizzle/schema.ts` to automatically update on record changes. - Added `updatedAt` field to the response in `src/routes/query-views/list.ts` and `src/routes/views/list.ts` to ensure it reflects the current timestamp.
This commit is contained in:
@@ -477,7 +477,7 @@ export const queryViews = pgTable("query_views", {
|
||||
data: jsonb().default({}),
|
||||
|
||||
createdAt: timestamp('createdAt').notNull().defaultNow(),
|
||||
updatedAt: timestamp('updatedAt').notNull().defaultNow(),
|
||||
updatedAt: timestamp('updatedAt').notNull().defaultNow().$onUpdate(() => new Date()),
|
||||
}, (table) => [
|
||||
index('query_views_uid_idx').using('btree', table.uid.asc().nullsLast()),
|
||||
index('query_title_idx').using('btree', table.title.asc().nullsLast()),
|
||||
|
||||
Reference in New Issue
Block a user