metatroncubeswdev 90f3237dfe feat: WordPress member export migration script
Adds scripts/migrate_wp_members.py to import TNCSC's real WordPress
member export (data/raw/users.csv, gitignored - real PII, never
committed) into Community OS Membership. Separate from
migrate_members.py, which expects a clean documented schema - this one
reads the real WooCommerce export's messy shape directly: duplicate
"Country"/"State" columns (read by position, not name, to get the real
profile ones instead of empty leftover checkout-form columns), free-text
membership levels mapped to tier codes, and legacy WordPress
"Membership ID"s preserved as a chatter note rather than reused as the
new member ID (229 of 493 rows didn't have one at all).

Test/spam rows (@abbuzz.com) are skipped; date of birth and the
citizenship/immigration-eligibility columns in the source export are
never read anywhere - no field for them and they're sensitive with no
operational purpose here. Ambiguous multi-value Levels are imported
without a tier and flagged 'needs_review' in the report rather than
guessed.

Run against tncsc_site and verified: 474 real members created (472 with
a resolved tier or legacy-ID note), 10 junk rows skipped, 8 flagged for
manual tier review, 1 non-member org inbox correctly excluded. Re-run
confirmed idempotent (474 updated, zero duplicates).
2026-08-24 02:58:47 -04:00
..