Skip to content
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

Ignore certain columns by default #1459

Open
fatkodima opened this issue Jan 27, 2024 · 2 comments
Open

Ignore certain columns by default #1459

fatkodima opened this issue Jan 27, 2024 · 2 comments

Comments

@fatkodima
Copy link

fatkodima commented Jan 27, 2024

We are currently using paper_trail and have billions of items in the versions table and the table is huge.

One of the reasons is that we have touch: true in associations and every change in the child record touches parent record and a new version record for this is created.
In reality, most (all?) projects do not need to track just this column change, additionally to other columns like lock_version.

So, I think these should be ignored by default. I propose to not change the library to ignore it, but extend the generator to also generate an initializer file for people to use in their projects and to have these columns ignored in it. Having this initializer will be also easier for users to see what can be configured and have a reasonable configuration already in place.

An alternative library (audited) already does this by default https://github.com/collectiveidea/audited/blob/4ffc6c14c4d1692f1ad626f1a4e95d28c968e6bf/lib/audited.rb#L38

Wdyt? I can help with the PR.

Copy link

This issue has been automatically marked as stale due to inactivity.
The resources of our volunteers are limited.
Bug reports must provide a script that reproduces the bug, using our template. Feature suggestions must include a promise to build the feature yourself.
Thank you for all your contributions.

@github-actions github-actions bot added the Stale label Apr 30, 2024
@fatkodima
Copy link
Author

Valid. I still want to implement this.

@github-actions github-actions bot removed the Stale label May 1, 2024
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

No branches or pull requests

1 participant