Skip to content

Add new schema options#273

Merged
simolus3 merged 6 commits into
mainfrom
schema-options
May 6, 2025
Merged

Add new schema options#273
simolus3 merged 6 commits into
mainfrom
schema-options

Conversation

@simolus3
Copy link
Copy Markdown
Contributor

This exposes the new table options introduced in version 0.3.13 of the core extension, namely:

  • include_old (either a boolean or an array of column names): Adds an old entry to the ps_crud.data JSON object that includes old values for updates.
  • include_old_only_when_changed: Skip unchanged values from updates.
  • include_metadata: Adds a _metadata column that can be written to for updates. It's reported through CrudEntry.metadata afterwards.
  • ignore_empty_update: Don't create ps_crud entries for UPDATE statements that didn't change any values.

Most of this feature is tested in the core extension, this adds a few simple tests ensuring we forward options correctly.

@simolus3 simolus3 requested a review from stevensJourney April 28, 2025 13:46
Copy link
Copy Markdown
Contributor

@stevensJourney stevensJourney left a comment

Choose a reason for hiding this comment

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

Changes here LGTM. I think this is good-to-go after we finalize the naming conventions of these new additions.

Copy link
Copy Markdown
Contributor

@stevensJourney stevensJourney 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

@simolus3 simolus3 merged commit 80e6bc7 into main May 6, 2025
5 checks passed
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