Let a department sit under a parent department

Featurekamo-shared-library
Ya
7 Agosti 2026, 05:45 UTC
Mwandishi
Kamo
Ahadi ya
86dee33

Departments were a flat list, so an org chart with Operations > Customer Success > Onboarding had no way to say so. Department gains an optional self-referencing parent; null still means top level, which is what every existing row stays. The FK column pins columnDefinition = "UUID". Left off, Hibernate copies the referenced primary key's definition -- UUID DEFAULT gen_random_uuid() -- onto the FK, so a ddl-auto run over a populated DEPTS stamps every row with a random parent matching no department and the ADD CONSTRAINT that follows fails. Parent assignment is validated in the service, not just the picker: self-parent, cycles (walking up from the proposed parent must not reach the department being moved), a parent in another organization, and an unknown id are all refused. Deleting a department promotes its children to its own parent rather than stranding them behind a dangling pointer. **************** now take their request DTO instead of eight positional arguments, which is what made adding a ninth worth avoiding.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei