feat(preferences): add scope columns migration and constants#1361
Merged
whoAbhishekSah merged 3 commits intomainfrom Feb 3, 2026
Merged
feat(preferences): add scope columns migration and constants#1361whoAbhishekSah merged 3 commits intomainfrom
whoAbhishekSah merged 3 commits intomainfrom
Conversation
Add database migration for org-scoped user preferences: - scope_type: references namespaces, defaults to 'app/platform' - scope_id: text field, defaults to zero UUID - Uses zero values instead of NULL for PostgreSQL 14 compatibility - Updates unique constraint to include scope columns Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Pull Request Test Coverage Report for Build 21623059426Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Add ScopeType and ScopeID fields to both domain and postgres models to handle the new database columns. Transform function converts zero values back to empty strings for the API layer. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update the Set method to include scope_type and scope_id columns in the INSERT and ON CONFLICT clause to match the new unique constraint (resource_type, resource_id, scope_type, scope_id, name). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
rohilsurana
approved these changes
Feb 3, 2026
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.
Summary
Adds database schema for org-scoped user preferences feature.
Migration adds:
scope_type- references namespaces table, defaults toapp/platformscope_id- text field, defaults to zero UUID (00000000-0000-0000-0000-000000000000)uq_preferences_resource_scopeDesign decisions:
Part of: #1347
Test plan
🤖 Generated with Claude Code