Skip to content

Commit

Permalink
perf: index globals versions timestamps by default (#8821)
Browse files Browse the repository at this point in the history
  • Loading branch information
r1tsuu authored Oct 24, 2024
1 parent 1a15425 commit 6e919cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/payload/src/collections/config/sanitize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const sanitizeCollection = async (
disableBulkEdit: true,
hidden: true,
},
index: true,
label: ({ t }) => t('general:updatedAt'),
})
}
Expand Down
2 changes: 2 additions & 0 deletions packages/payload/src/versions/buildGlobalFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ export const buildVersionGlobalFields = (
admin: {
disabled: true,
},
index: true,
},
{
name: 'updatedAt',
type: 'date',
admin: {
disabled: true,
},
index: true,
},
]

Expand Down

0 comments on commit 6e919cc

Please sign in to comment.