Deleting versions using api vs browser

Hi all, Curious! we are able to delete versions from the browser, which deletes the files from the storage while keeping the version data in the database, where as with the api (delete_version) we are able to delete the version data in the db while keeping the files, is it ok if we keep the last 2 versions and delete it using the api?, Will this cause any issues down the lane?

Quick Recap:

Deleting published product is a 2 step process:

  1. Delete published product version files on disk.
  2. Delete respective DB records.

Current status,

  1. Deleting from Desktop browser, deletes the files but not the DB records.
  2. Deleting from API or products page on AYON server, deletes the DB records but not the related files.

I can think of one issue: “dependencies” to find out if any of the old version are referenced in other products or workfiles.
This also can be checked the other way where you check if the recent workfiles or products are referencing old versions.

Other than that, the solution you have outlined perfectly aligns with AYON Project Archival Addon. which by default keeps the last 2 versions, can copy versions files to backup location prior deletion.
It’s also capable of cleaning up work directories.

Yes this looks great, but seems its a pro feature,
we just wanted to delete older versions as its filling up the db and we where facing timeout issues.