kitware-resonant / dkc-next

Apache License 2.0
3 stars 0 forks source link

Enforce max folder depth as a database constraint #61

Closed brianhelba closed 3 years ago

brianhelba commented 3 years ago

This pushes max folder depth enforcement to two extremes:

This also starts the expectation that at Folder instantiation, the choice of parent will be decided (either None or specified). Changing a Folder's parent after instantiation confers a responsibility to update all associated denormalized fields (e.g. depth).

brianhelba commented 3 years ago

I realized refactoring this was necessary as part of creating a Folder factory. It should be simpler to review as a separate change. I also think it's an improvement in its own right, as we now have fewer things happening via signals (which are hard to maintain) and more database constraints.