Skip to content

Migration 009: create user_profile stub on signup (manual apply) #18

Description

@KrishP147

Follow-up from #8. The frontend fix in #8 removes the Google-login lockout, but there is still no server-side guarantee that a user_profile row exists.

Blockers found by the planner: user_profile has age, gender, height_cm, weight_kg NOT NULL with no defaults (backend/migrations/002_user_management.sql), so a naive auth.users AFTER INSERT trigger would raise and abort every signup. Doing it properly needs: make those columns nullable or give defaults; check 004 trigger_log_weight against NULL weight; audit MealForm, Recommendations, PhotoMealUpload which assume full profile rows.

Deliverable: backend/migrations/009_user_profile_on_signup.sql + doc note in docs/02-database-setup.md that it is manual-apply. Do NOT run against prod from CI.

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions