Structure Nav History increases database size

Umang Patel's Avatar

Umang Patel

31 Jul, 2018 01:50 AM

Hi,

I am using Structure version 4.3.18. Every time I save page, it created new entry in table "exp_structure_nav_history". Is there a way to self delete old entries or limit to max 10 revisions on this? Currently there are only 200 entries and it's taking 4 times the space of all other tables.

Thanks

  1. Support Staff 1 Posted by Support on 31 Jul, 2018 11:23 AM

    Support's Avatar

    Hi Umang, there is a config override you can set to control how many history states it saves:
    $config['structure_nav_history_states'] = 200;

    There is also a config override for turning the history completely off if you need to:
    $config['structure_nav_history'] = 'n';

    PLEASE NOTE: Turning off or extremely limiting the number of history states can put you into a jam if something happens to your site. If you limit it to 10 changes and someone changes something that causes an issue, it's very easy to go through those 10 (or 100) without realizing there's an issue and then it's too late to use the History feature.

    Depending on how many entries you have in your system, 200 entries should be reasonable in size. Yes, it's going to be much larger than pretty much any other table but it is the part that controls the entire structure of your site and navigation so you'll have to weigh the cost of DB space vs what would happen if you lost all that data and had to roll back to a previous DB backup or manually re-create your Structure tree.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac