Skip to content

BUG: null email causes PostgreSQL NOT NULL violation during therapist registration#192

Description

@hasanravda

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

馃搶 Issue Overview

When a new therapist completes the registration form (PersonalDetailsScreen), the app crashes with a Postgres exception because email and phone are NOT NULL in the therapist table but were never included in the storePersonalInfo insert payload.

Root Cause

storePersonalInfo in SupabaseAuthRepository only spread personalInfoEntity.toMap() - which doesn't contain email or phone since those aren't fields in TherapistPersonalInfoEntity

馃攳 Steps to Reproduce

  1. Sign in with a Google account that has no existing therapist record
  2. Fill in the registration form and tap Continue
  3. App throws: PostgrestException: null value in column "email" violates not-null constraint

馃幆 Expected Behavior

After completing the registration form and tapping Continue, the therapist's record is successfully inserted into the therapist table with their Google account email and provided phone number. The user is navigated to the Home screen.

馃毃 Actual Behavior

Insert fails with Postgres Exception
PostgrestException: null value in column "email" of relation "therapist" violates not-null constraint

馃摲 Screenshot

Image

Record

  • I agree to follow this project's Code of Conduct
  • I want to work on this issue

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions