diff --git a/server/AyaNova/biz/AttachmentBiz.cs b/server/AyaNova/biz/AttachmentBiz.cs index 09217c3c..22bf7f03 100644 --- a/server/AyaNova/biz/AttachmentBiz.cs +++ b/server/AyaNova/biz/AttachmentBiz.cs @@ -76,6 +76,19 @@ namespace AyaNova.Biz // var seed = new Util.Seeder(); // await seed.SeedDatabaseAsync(seedLevel, job.GId, timeZoneOffset); + // EXISTENCE CHECK + // iterate FileAttachment records, if physically present then flag as such + // make sure it has a short circuit that if there are NO files physically then all are out of sync + // this scenario is someone moving a db and not moving physical files + // ORPHANED FILES CHECK + // These should never be out of sync due to timing issues, the file would be deleted before teh db record + // iterate physical files, if not in db then make a FileAttachment record for it AyaType nothing id 0 + // if user want's to move them, they can download and then attach and then remove the generated attachment (Nothing id 0) the holder of orphaned files + // (Or move feature) + // DE-ORPHANIZE ACTION + // iterate orphaned file attachments to NOTHING type, if found to be attached to any other object remove the orphaned object attachement + + await JobsBiz.LogJobAsync(job.GId, "Finished."); await JobsBiz.UpdateJobStatusAsync(job.GId, JobStatus.Completed);