Data migration fro removing duplicate records in FileHistory table. Only retaining the unique recordwith the latest 'created_at' timestamp.
Why
Applying the scheme migration is failing for few of the oprganization schema as ir contains duplicate values for the enforced unique constraints
How
Added data migrations.
Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
Migration was failing previously. due to the above mentioned cases. This fix should sort out such issues
Database Migrations
yes
Env Config
Relevant Docs
-
Related Issues or PRs
-
Dependencies Versions
-
Notes on Testing
Tested by unapplying migrations and creating duplicate entries in FileHistory model. Working as expected.
Screenshots
Checklist
I have read and understood the [Contribution Guidelines]().
What
Why
How
Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
Database Migrations
Env Config
Relevant Docs
-
Related Issues or PRs
-
Dependencies Versions
-
Notes on Testing
Screenshots
Checklist
I have read and understood the [Contribution Guidelines]().