"""Add ``cost_center`` column to ``identity_persons``. The Identity Sync Center exposes ``{cost_center}`` in its mapping context whitelist (used by Navan SCIM enterprise.costCenter and similar downstream fields). We were rendering it as an empty string because no source column existed; this migration adds the column and the SuccessFactors sync starts pulling ``EmpJob.costCenter`` to populate it. Backfill is left to the next HRIS sync — the column lands as NULL and the SF sync's upsert pass fills it in. No data migration here because the SF sync owns the field; lying about a value would mask which rows are actually stale. """ from __future__ import annotations import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "123_identity_persons_cost_center" down_revision = "122_identity_sync_center" branch_labels = None depends_on = None def upgrade() -> None: op.add_column( "identity_persons", sa.Column("cost_center", sa.String(64), nullable=True), ) def downgrade() -> None: op.drop_column("identity_persons", "cost_center")