Skip to content

Leaderboard Seed onboarding preferences migration #208

Description

@devmeireles

Describe the bug
Running make dev fails during leaderboard seeding with Prisma error P2022 because column user.onboardingPreferences is missing in the current database.

To Reproduce

  1. Run make dev from project root.
  2. Let setup complete dependency install and Prisma deploy.
  3. Wait for seed step pnpm run db:seed-leaderboard.
  4. Observe failure in scripts/seed-leaderboard-data.ts at prisma.user.upsert().

Expected behavior
make dev should complete successfully, including leaderboard seeding.

Screenshots
N/A (terminal output attached below).

Desktop (please complete the following information):

  • OS: Linux
  • Browser: N/A
  • Version: N/A

Smartphone (please complete the following information):

  • Device: N/A
  • OS: N/A
  • Browser: N/A
  • Version: N/A

Additional context
Observed output during make dev:

🌱 Seeding leaderboard data with sample users and workout sessions...
👤 Creating sample users...
❌ Error seeding leaderboard data: PrismaClientKnownRequestError:
Invalid `prisma.user.upsert()` invocation in scripts/seed-leaderboard-data.ts:77:25
The column `user.onboardingPreferences` does not exist in the current database.
code: 'P2022'

Prisma migration output before failure shows only one migration found/applied (0_init).

Potential cause:

  • Prisma schema references User.onboardingPreferences but active migration history does not include the column creation for this environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions