PaymentStorageSchema is declared final, so a module that adds a base field to kessai_payment and needs to index it (for example orchestra_payment, which adds an orchestra_token field and looks payments up by it) cannot extend the schema to add its index. Its only option is to swap the storage_schema handler for a class that extends core SqlContentEntityStorageSchema and re-declares kessai's own subject index verbatim, so kessai's index is not lost.

That copy is a maintenance hazard: if kessai later changes its subject index (columns, order or name), the consumer's copy drifts silently and, on any site with the consumer enabled, kessai's change never lands (its handler no longer runs).

Proposal

Let a consumer contribute an index without replacing the whole schema. Either:

  • drop final from PaymentStorageSchema so a consumer can extend it (call parent, add its own index), or
  • expose the index set as a protected method (or a hook) a consumer can add to.

Dropping final is the smallest change and matches how the engine entities' storage schemas are written elsewhere.

Context: orchestra_payment #3610754 needed this and worked around it by copying the subject index into its own storage schema. This issue removes the need for that copy.

Issue fork kessai-3610757

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

  • mably committed 7fb374a1 on 1.x
    task: #3610757 Make PaymentStorageSchema extensible so a consumer can...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.