Fix: Set hasSequentialIdsMigrated=true for new personal organizations#1998
Merged
Fix: Set hasSequentialIdsMigrated=true for new personal organizations#1998
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Copilot
AI
changed the title
[WIP] Fix: New personal organizations should have the flag for sequential ids generated set to true
Fix: Set hasSequentialIdsMigrated=true for new personal organizations
Aug 22, 2025
DonKoko
approved these changes
Aug 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a new user registers, their personal organization was created with
hasSequentialIdsMigrated=false, causing the sequential ID migration modal to appear unnecessarily on first login. This created a poor user experience where new users were prompted to run a migration they didn't need.Problem
The
hasSequentialIdsMigratedfield in the Prisma schema defaults tofalse. The migration modal is triggered when:hasSequentialIdsMigratedisfalseIn
/app/modules/user/service.server.ts, thecreateUserfunction creates personal organizations without explicitly setting this flag, causing it to default tofalseand trigger unnecessary migrations.Solution
This PR adds
hasSequentialIdsMigrated: trueto personal organization creation in thecreateUserfunction, maintaining consistency with how team organizations are created in thecreateOrganizationfunction.Changes:
app/modules/user/service.server.ts: SethasSequentialIdsMigrated: truefor new personal organizationsapp/modules/user/service.server.test.ts: Update test expectations to include the new flagImpact
The fix is minimal and surgical, addressing exactly the issue described without affecting existing functionality.
Fixes #1997.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
binaries.prisma.shnode scripts/postinstall.js(dns block)node /home/REDACTED/work/shelf.nu/shelf.nu/node_modules/.bin/prisma -v(dns block)node /home/REDACTED/work/shelf.nu/shelf.nu/node_modules/.bin/prisma generate(dns block)checkpoint.prisma.io/usr/local/bin/node /home/REDACTED/work/shelf.nu/shelf.nu/node_modules/prisma/build/child {"product":"prisma","version":"6.14.0","cli_install_type":"local","information":"","local_timestamp":"2025-08-22T14:37:23Z","project_hash":"e6fa372b","cli_path":"/home/REDACTED/work/shelf.nu/shelf.nu/node_modules/.bin/prisma","cli_path_hash":"39199cc4","endpoint":"REDACTED","disable":false,"arch":"x64","os":"linux","node_version":"v20.19.4","ci":true,"ci_name":"GitHub Actions","command":"generate","schema_providers":["postgresql"],"schema_preview_features":["fullTextSearchPostgres"],"schema_generators_providers":["prisma-client-js"],"cache_file":"/home/REDACTED/.cache/checkpoint-nodejs/prisma-39199cc4","cache_duration":43200000,"remind_duration":172800000,"force":false,"timeout":5000,"unref":true,"child_path":"/home/REDACTED/work/shelf.nu/shelf.nu/node_modules/prisma/build/child","client_event_id":"","previous_client_event_id":"","check_if_update_available":true}(dns block)/usr/local/bin/node /home/REDACTED/work/shelf.nu/shelf.nu/node_modules/prisma/build/child {"product":"prisma","version":"6.14.0","cli_install_type":"local","information":"","local_timestamp":"2025-08-22T14:40:52Z","project_hash":"e6fa372b","cli_path":"/home/REDACTED/work/shelf.nu/shelf.nu/node_modules/.bin/prisma","cli_path_hash":"39199cc4","endpoint":"REDACTED","disable":false,"arch":"x64","os":"linux","node_version":"v20.19.4","ci":true,"ci_name":"GitHub Actions","command":"generate","schema_providers":["postgresql"],"schema_preview_features":["fullTextSearchPostgres"],"schema_generators_providers":["prisma-client-js"],"cache_file":"/home/REDACTED/.cache/checkpoint-nodejs/prisma-39199cc4","cache_duration":43200000,"remind_duration":172800000,"force":false,"timeout":5000,"unref":true,"child_path":"/home/REDACTED/work/shelf.nu/shelf.nu/node_modules/prisma/build/child","client_event_id":"","previous_client_event_id":"","check_if_update_available":true}(dns block)/usr/local/bin/node /home/REDACTED/work/shelf.nu/shelf.nu/node_modules/prisma/build/child {"product":"prisma","version":"6.14.0","cli_install_type":"local","information":"","local_timestamp":"2025-08-22T14:41:04Z","project_hash":"e6fa372b","cli_path":"/home/REDACTED/work/shelf.nu/shelf.nu/node_modules/.bin/prisma","cli_path_hash":"39199cc4","endpoint":"REDACTED","disable":false,"arch":"x64","os":"linux","node_version":"v20.19.4","ci":true,"ci_name":"GitHub Actions","command":"generate","schema_providers":["postgresql"],"schema_preview_features":["fullTextSearchPostgres"],"schema_generators_providers":["prisma-client-js"],"cache_file":"/home/REDACTED/.cache/checkpoint-nodejs/prisma-39199cc4","cache_duration":43200000,"remind_duration":172800000,"force":false,"timeout":5000,"unref":true,"child_path":"/home/REDACTED/work/shelf.nu/shelf.nu/node_modules/prisma/build/child","client_event_id":"","previous_client_event_id":"","check_if_update_available":true}(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.