KamoCRM

Add DEPTS.PARENT_DEPT_ID for nested departments

FeatureInitializerService
Shipped
7 ஆகஸ்ட், 2026 அன்று 5:58 AM UTC
Author
Kamo
Commit
7f70b12

Nullable with no backfill -- null means top level, which is what every existing department was and most will stay. Declared plain UUID with an explicit DROP DEFAULT. Departments key off UUID DEFAULT gen_random_uuid(), and a FK column that inherits that default gets stamped with a random parent on every existing row, orphaning all of them and failing the constraint that follows.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing