Skip to content

Add new schema options #273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Add new schema options #273

wants to merge 5 commits into from

Conversation

simolus3
Copy link
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
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.

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