feat(schema): add user preferences infrastructure for EPIC-09#707
Merged
Conversation
- Migration 0018: create user_preferences table with UNIQUE(user_id, key) - Drizzle schema: add userPreferences table definition - Shared types: add UserPreference, PreferenceKey, DashboardCardId, UpsertPreferenceRequest, PreferencesResponse - Export new types from @cornerstone/shared index - Wiki: add dashboard architecture section, fix Schema.md deviations (invoice_budget_lines ON DELETE CASCADE, migration renumbering) Refs #470 Co-Authored-By: Claude product-architect (Opus 4.6) <noreply@anthropic.com>
9 tasks
Contributor
|
🎉 This PR is included in version 1.15.0-beta.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Contributor
|
🎉 This PR is included in version 1.15.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
user_preferencestable): INTEGER PK AUTOINCREMENT,user_idFK to users with ON DELETE CASCADE,key/valueTEXT columns, UNIQUE(user_id, key) constraint, index on user_iduserPreferencestable definitionUserPreference,PreferenceKey,DashboardCardId,UpsertPreferenceRequest,PreferencesResponseinshared/src/types/preference.tsDesign Decisions
DashboardCardIdtype enumerates the 8 dashboard cards for thedashboard.hiddenCardspreferenceSchema Deviation Fixes
invoice_budget_lines: wiki said ON DELETE SET NULL for budget FKs, actual code uses ON DELETE CASCADE (required by XOR CHECK constraint, see Bug BUG: Migration 0017 ON DELETE SET NULL incompatible with XOR CHECK constraint in SQLite #611)user_preferencesmigration: renumbered from 0017 to 0018 (0017 isinvoice_budget_lines)Test plan
Refs #470
🤖 Generated with Claude Code