[UXPROD-3172] Migrate file storage for Agreements and Licenses from database to file store Created: 09/Jul/21  Updated: 03/Mar/22  Resolved: 03/Mar/22

Status: Closed
Project: UX Product
Components: None
Affects versions: None
Fix versions: Lotus (R1 2022)

Type: New Feature Priority: TBD
Reporter: Owen Stephens Assignee: Unassigned
Resolution: Done Votes: 0
Labels: erm
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Defines
is defined by ERM-1929 Support configuration of document sto... Closed
is defined by ERM-1938 Abstract and subclass existing toolki... Closed
is defined by ERM-1943 Abstract and subclass existing toolki... Closed
Relates
relates to ERM-1779 Convert PDF pg_largeobject into bytea Closed
Release: Lotus R1 2022
Development Team: Bienenvolk
PO Rank: 0
Rank: Cornell (Full Sum 2021): R4
Rank: GBV (MVP Sum 2020): R1

 Description   

Current situation or problem:

  • When you add a document to an Agreement or License you have the option to upload a file
    • This file is stored in the database as a large object
    • PostgreSQL can decide to store this in a different schema
    • This makes replication/migration of a database schema for (e.g.) agreements complicated because you have to also migrate the large storage schema
    • In a multi-tenant situation this means it becomes very challenging to separate out the tenants

In scope

Substitute in a file storage mechanism based S3 compatible protocols instead of the use of the database to store files

Out of scope

Implementation of other file storage mechanisms (e.g. box.com)

Use case(s)

Proposed solution/stories

Links to additional info

Questions



 Comments   
Comment by Ian Ibbotson (Use this one) [ 15/Sep/21 ]

Edit: the following has been split out to ERM-1938 Closed and ERM-1943 Closed


Discussed with steve.osguthorpe - definitely think the way to go is to make abstract and then subclass the existing com.k_int.web.toolkit.files.FileObject into LOBFileObject and S3FileObject each with the same signature and a different implementation.  Migration should add the default discriminator to the revised table structure to turn all FileObjects into LOBFileObjects. upgrade script can then work through all LOBFileObjects converting them to S3FileObjects. This will likely take time to complete at upgrade. Since licenses don't have jobs (currently) it may be better manually triggered. Existing LOB attachments should continue to work until all files are migrated.

Generated at Fri Feb 09 00:29:55 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.