Add DEPTS.PARENT_DEPT_ID for nested departments

FeatureInitializerService
Shipped
August 7, 2026 at 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?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing