Skip to content

fix(mitthooks-drizzle): persist variantKey on update and upsert#68

Open
jankal wants to merge 1 commit intoweissaufschwarz:mainfrom
jankal:fix/persist-variant-key
Open

fix(mitthooks-drizzle): persist variantKey on update and upsert#68
jankal wants to merge 1 commit intoweissaufschwarz:mainfrom
jankal:fix/persist-variant-key

Conversation

@jankal
Copy link
Copy Markdown

@jankal jankal commented Feb 20, 2026

Summary

  • Add variantKey to the SET clause in PgExtensionStorage.updateExtension()
  • Add variantKey to .values() and .onConflictDoUpdate().set() in PgExtensionStorage.upsertExtension()

Without this fix, InstanceUpdated webhooks from mittwald do not persist the new variantKey to the database, even though the column exists in the schema and the type includes the field.

Test plan

  • Trigger an InstanceUpdated webhook and verify variant_key column is updated in the DB
  • Trigger an InstanceAdded webhook and verify variant_key is set on initial insert
  • Trigger an InstanceAdded webhook for an existing instance (upsert path) and verify variant_key is updated

🤖 Generated with Claude Code

…ertExtension

PgExtensionStorage.updateExtension() does not include variantKey in
its SET clause, so InstanceUpdated webhooks silently drop the new
variant. The same field is also missing from upsertExtension()'s
INSERT values and ON CONFLICT UPDATE set.

Add variantKey to all three locations so it is persisted correctly.
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.

1 participant