Skip to content

Ignore certain columns by default #1459

@fatkodima

Description

@fatkodima

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    keepDo not mark this issue stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions