django-simple-history icon indicating copy to clipboard operation
django-simple-history copied to clipboard

Add option to exclude index creation for `history_user_id` field in history tables

Open romank0 opened this issue 2 years ago • 0 comments

Problem Statement This PR added the feature to exclude index creation for the fields from the original model. Also there's an option to exclude the index creation for the history_date field via SIMPLE_HISTORY_DATE_INDEX = False configuration option. There's however no convenient way to prevent index creation for the history_user field.

For large tables this index may be quite large and that slows dows modifications even that the index is never used.

Describe the solution you'd like The configuration option like SIMPLE_HISTORY_USER_INDEX that would allow to disable index creation.

Describe alternatives you've considered The workaround is to define the history user field manually. This is cumbersome and error prone.

Additional context N/A

romank0 avatar Feb 21 '23 10:02 romank0