Skip to content

Comments

feat(plugin/timestamps): add indexStrategy option for entity indexing#332

Open
dswbx wants to merge 1 commit intomainfrom
feat/timestamps-index
Open

feat(plugin/timestamps): add indexStrategy option for entity indexing#332
dswbx wants to merge 1 commit intomainfrom
feat/timestamps-index

Conversation

@dswbx
Copy link
Contributor

@dswbx dswbx commented Jan 9, 2026

Addresses #325, related #326

Introduced a new indexStrategy option in the timestamps plugin to configure index generation for created_at and updated_at fields. Supports "composite" and "individual" strategies for better control over database indexing. Added test coverage for different index strategies.

import { timestamps } from "bknd/plugins";

export default {
   options: {
      plugins: [
         timestamps({ 
            entities: ["pages"],
            indexStrategy: "composite" // or "individual" to create separate indexes
         })
      ],
   },
} satisfies BkndConfig;

Introduced a new `indexStrategy` option in the timestamps plugin to configure index generation for `created_at` and `updated_at` fields. Supports "composite" and "individual" strategies for better control over database indexing. Added test coverage for different index strategies.
Copy link
Collaborator

@cameronapak cameronapak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Has my approval and blessing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants