Skip to content

Conversation

@TooAngel
Copy link
Owner

Summary

  • Migration now deletes users with expired tokens instead of leaving them as orphaned records
  • These users cannot be linked to GitHub accounts (no githubUserId, expired token)
  • Leaving them causes duplicate records when they log in again, since OAuth flow creates new users when findByGithubUserId returns null

Test plan

  • Run npm test - all tests pass
  • Deploy and verify migration logs show "Deleted orphaned" instead of "Failed"

Users without githubUserId and with expired tokens cannot be linked to
GitHub accounts. Leaving them in the database causes duplicate records
when those users log in again, since the OAuth flow creates new user
records when findByGithubUserId returns null.

The migration now deletes these orphaned users instead of just logging
them, keeping the database clean.
@worlddriven
Copy link
Contributor

worlddriven bot commented Dec 22, 2025

🤖 Worlddriven Status

📊 Live Status Dashboard

🗓️ Merge Date: 2025-12-24 at 01:42:02 UTC (today)
📅 Started: 2025-12-22 at 06:31:34 UTC
Speed Factor: 0.18 (82% faster due to reviews)
Positive votes: 310/378 contribution weight (coefficient: 0.82)
📈 Base Merge Time: 10 days → Current: 2 days

🎯 Want to influence when this merges?

Your review matters! As a contributor to this project, your voice helps determine the merge timeline.

How to review:

  1. Check the changes
    Files changed

  2. Leave your review
    Review changes

Your options:

  • ✅ Agree & Speed Up: Approve Approving makes this merge faster
  • ❌ Disagree & Slow Down: Request changes Requesting changes delays the merge

💡 Pro tip: The more contributors who agree, the faster this gets merged!

📊 View detailed stats on the dashboard

📋 Recent Activity

2025-12-22, 06:31:42 - Pull request opened
2025-12-22, 06:31:43 - Pull request opened
2025-12-24, 01:51:43 - Pull request merged by worlddriven ✅


This comment is automatically updated by worlddriven

@worlddriven worlddriven bot merged commit d204d0e into master Dec 24, 2025
2 checks passed
@worlddriven worlddriven bot deleted the fix/cleanup-orphaned-users-migration branch December 24, 2025 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants