You are viewing limited content. For full access, please sign in.

Question

Question

What is the vhist_propval table used for?

asked on July 3, 2023 Show version history

In a repository database, what is the vhist_propval table used for?

0 0

Replies

replied on July 3, 2023 Show version history

I believe those tables are used for version history, so if you enable version tracking for a document in the repository it will populate the vhist tables with the initial version and any subsequent changes.

The vhist_propval table specifically would hold metadata/field values for each version of the document. If you change a field value on a versioned document, you should see a new row get added.

0 0
replied on July 3, 2023

That's what I was thinking. We were trying to narrow down a performance issue and discovered that a folder had versioning turned on for all new documents. Does anyone know if there is a way to delete versions of entries, preferably using Workflow? We have over 10 million rows of data in the vhist_propval table that are not needed because we don't need versions of the documents in this repository.

0 0
replied on July 3, 2023 Show version history

There's no built-in activity for deleting versions in workflow, but I have a SDK script I use for redactions where we delete the unredacted version(s).

bool complete = true;

try {
    // get document and version history
    DocumentInfo doc = (DocumentInfo)this.BoundEntryInfo;
    VersionHistory history = doc.GetVersionHistory();
    
    // iterate document version history
    foreach (DocumentVersion v in history) {
        // check for previous versions that have not been expunged
        if (v.Version != doc.CurrentVersion && !v.IsExpunged) {
            // delete unredacted version with comments
            v.Delete("Version Deleted: Redaction required.");

            // double-check deleted status
            if (!v.IsExpunged) {
                complete = false;
            }
        }
    }
}
catch (Exception ex){
    WorkflowApi.TrackError(ex.Message);
    complete = false;
}
finally {
    SetTokenValue("Complete", complete);
}

However, once versioning is enabled on a document I don't believe there is any way to turn it off, so it'll still create new versions if anything changes moving forward.

You might be better off just copying/replicating all the entries to create ones that are not under version control.

1 0
replied on July 5, 2023

You might be better off just copying/replicating all the entries to create ones that are not under version control.

Do be mindful of any "On Entry Creation" workflows this may trigger, any scenarios where the entry Creator property could matter, and audit history implications.

1 0
replied on July 5, 2023

Agreed. Watching out for workflow triggers is a very good point.

I would also be more likely to use the Replicate Entries activity rather than just copying since replicating can preserve more of the original data (watch out for the "make redactions permanent" setting).


1 0
replied on July 5, 2023

Creating new entries is not an option for us as we have an integration in place that is tied to entry id's. 

0 0
replied on July 6, 2023

Out of curiosity, how big is the table on disk?

0 0
replied on July 6, 2023

1.08 GB

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.