29th / personnel-v2

Personnel management system version 2 (legacy)
4 stars 7 forks source link

Fix ancestry on newly created units #504

Closed wilson29thid closed 3 years ago

wilson29thid commented 3 years ago

Units created after the introduction of the units.ancestry column don't have a value for that. We'll need to dynamically generate it, and then hopefully switch people to v3 for creating/modifying units.

wilson29thid commented 3 years ago

Updated manually using:

UPDATE `personnel_v2`.`units`
SET ancestry = trim(both '/' from path)
WHERE (`path` <> '/') 
    AND (`ancestry` IS NULL)

And deprecation notice added to units page in v2 admin via https://github.com/29th/personnel-api/commit/6a44a6e1e3a201bda4918a21ad159cf262cd9163

Screenshot 2021-03-03 at 06 43 58