You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of the D3.1 umbrella (#334): phase 4 of 6. Contract step: removes the twelve moved fields and the moved unique constraint from CustomUser now that phases 2 and 3 have switched every reader.
Normative sources
Source
What it governs
community-base repo: docs/plan/phase-3.mdD3.1
Contract step
_docs/specs/09-migration-rollout-roadmap.md
Expand-and-contract rollout policy: this is the "contract" half
CustomUser no longer declares role, certificate_name, country, region, registration_role, github_url, linkedin_url, personal_website_url, about_me, dark_mode, normalized_email, identity_state, or the accounts_active_normalized_email_unique constraint. courses.LearnerProfile and accounts_ext.IdentityState are the sole source of truth. No behavior change to any reader — they were already reading the new models as of phase 2/3.
Scope
Migration removing the twelve fields and the constraint from CustomUser.
Full-repository grep confirming no remaining attribute access to the removed fields off CustomUser/the auth model, outside migrations and the accounts.services.cmp_learner_import source-table string literals (accounts_customuser) and CmpLearnerImportProgress.table values, which name the CMP export's source tables, not the live model, and are intentionally unaffected.
Re-run of the gallery-module regression test added in phase 2 to confirm it is still green after the fields are gone (it should never have depended on them).
Non-goals
No rename (phase 5).
No AISL field additions (phase 6).
No change to username, newsletter_subscribed, home_dismissals, or newsletter_preference_changed_at (the last added to CustomUser after D3.1 umbrella: Extension models and user model rename (phased) #334's original grooming, alongside newsletter_subscribed in the BE-15 fix) — all four stay untouched; their eventual disposition is D3.2/C3.7 adoption-time reconciliation, not this issue.
CustomUser no longer declares the twelve fields or accounts_active_normalized_email_unique; the constraint is enforced on accounts_ext.IdentityState only.
A documented grep over tracked .py files (excluding migrations and the named CMP source-table literals) shows zero attribute access to the removed fields off the user model.
manage.py migrate applies cleanly end to end on a fresh database; the removal migration reverses, or its irreversibility is documented in the migration file.
Repository and operations
P14 row-count rehearsal on a development database copy: counts before and after recorded, every difference explained by the phase 1 per-user profile tables plus this phase's column drop. If no development copy is reachable locally, record Not run here, needs: P14 rehearsal on a development database copy and keep the issue open with the human label at acceptance.
Versioned verification plan per _docs/ci/change-selective-ci.md recorded in the engineer handoff.
Part of the
D3.1umbrella (#334): phase 4 of 6. Contract step: removes the twelve moved fields and the moved unique constraint fromCustomUsernow that phases 2 and 3 have switched every reader.Normative sources
community-baserepo:docs/plan/phase-3.mdD3.1_docs/specs/09-migration-rollout-roadmap.mdGoal
CustomUserno longer declaresrole,certificate_name,country,region,registration_role,github_url,linkedin_url,personal_website_url,about_me,dark_mode,normalized_email,identity_state, or theaccounts_active_normalized_email_uniqueconstraint.courses.LearnerProfileandaccounts_ext.IdentityStateare the sole source of truth. No behavior change to any reader — they were already reading the new models as of phase 2/3.Scope
CustomUser.CustomUser/the auth model, outside migrations and theaccounts.services.cmp_learner_importsource-table string literals (accounts_customuser) andCmpLearnerImportProgress.tablevalues, which name the CMP export's source tables, not the live model, and are intentionally unaffected.Non-goals
username,newsletter_subscribed,home_dismissals, ornewsletter_preference_changed_at(the last added toCustomUserafter D3.1 umbrella: Extension models and user model rename (phased) #334's original grooming, alongsidenewsletter_subscribedin the BE-15 fix) — all four stay untouched; their eventual disposition isD3.2/C3.7adoption-time reconciliation, not this issue.Dependencies
Acceptance criteria
Django and integration
make django-check/make migrations-checkpass.make test(full suite) passes.CustomUserno longer declares the twelve fields oraccounts_active_normalized_email_unique; the constraint is enforced onaccounts_ext.IdentityStateonly..pyfiles (excluding migrations and the named CMP source-table literals) shows zero attribute access to the removed fields off the user model.manage.py migrateapplies cleanly end to end on a fresh database; the removal migration reverses, or its irreversibility is documented in the migration file.Repository and operations
P14row-count rehearsal on a development database copy: counts before and after recorded, every difference explained by the phase 1 per-user profile tables plus this phase's column drop. If no development copy is reachable locally, recordNot run here, needs: P14 rehearsal on a development database copyand keep the issue open with thehumanlabel at acceptance._docs/ci/change-selective-ci.mdrecorded in the engineer handoff.