Skip to content

[user-service] migrate_firebase_users task in tasks_executor #1684

@davidgamez

Description

@davidgamez

Describe the problem

This issue adds a task to import Firebase users into the DB schema.

Proposed solution

The created task should be idempotent. It reads all Firestore user records via the Firebase Admin SDK and upserts users.app_user (skip existing by firebase_uid), stores raw org string in legacy_org_name. Supports dry_run. Safe to run repeatedly during the deployment window.
Field mapping:

DB field Resolve
users.id Datastore: uid
users.full_name Datastore: fullName
users.legacy_org_name Datastore: organization
notifications => users.notification_subscription linked to api. announcements Datastore: isRegisteredToReceiveAPIAnnouncements
users.registration_completed_at Datastore: registrationCompletionTime
user.email_verified Firestore DSK email_verified
users.created_at Firebase SDK createdAt
users.updated_at now

Alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions