Add AD_StorageProvider_ID to AD_Attachment (FHCA-1165)

Description

The migrate process developed with is problematic as it requires one single commit per tenant, with the actual model is not possible to have different attachment records in different storage providers, so, intermediate commits can create data corruption.

When migrating big attachment tables (millions of records) the process and the lock takes too long to be usable.

A better approach is to add AD_Attachment.AD_StorageProvider_ID and allow eventually mixed providers in the attachment table. The provider can be changed at any time and the system will keep working, so the migration process can be made without a maintenance window, even in lots, and not requiring to lock the entire attachment table.

Also, there is another positive impact in case somebody adds a new storage provider and simply changes the provider in client without migrating, actually if somebody does that, is destroying the access to all attachments on the tenant, with the new approach would be harmless.

Maybe this must apply the same for AD_Image and AD_Archive.

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created April 14, 2021 at 11:25 AM
Updated June 1, 2021 at 6:06 PM
Resolved April 22, 2021 at 7:51 PM