mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
Data rescue, not just schema tidying — the order matters: 1. Backfill companies.email from generalManagerEmail before the key is stripped, or companies whose only address lived there stop receiving mail. 2. Backfill ownerName/Email/Phone (now required) from owner, GM, contact person, then the columns; seed etradeManagerName so existing rows read as matching rather than as a false mismatch. 3. Convert poaSameAsOwner: non-forwarders become poaDeclared='no' with their poa* details cleared; forwarders become 'yes' and keep them, so they now owe a DARS letter they were previously waived. 4. Derive poaDeclared for everyone else. 5. Move drafts off the deleted 'personnel' wizard step. 6. Drop the general_manager_* columns and strip gm*/poaSameAsOwner. down() restores the column shape only; the stripped values are gone by design.