Repository navigation
Conversation
…ategoryId (#91) System categories are seeded (ids = enum values, renumbered from 1) and locked. Custom categories start at id 1000. Deleting one moves its transactions to Other and disables the rules that target it. The legacy category/targetCategory strings stay in the JSON contract until the cleanup PR.
… feature/91-categories-api # Conflicts: # .claude/skills/backend/SKILL.md
… feature/91-categories-api # Conflicts: # .claude/skills/backend/SKILL.md
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.
Part 1 of 5 for #91.
What
Categoriestable:Id, UserId (null = system), Key, Name, Kind, Group, Icon, Color.api/categories:GET(system + mine),POST,PUT {id},DELETE {id},GET {id}/usage.Otherand disables the rules that target it (they are re-pointed toOther, because the FK isRestrict).Transaction.CategoryIdandCategoryRule.TargetCategoryIdreplace the enum columns.categoryId.AddCategories, generated then edited by hand: create + seed →UPDATE +1(enum renumbered from 1) → rename columns → FKs → identity sequence at 1000.Down()reverses every step.Why
(int)TransactionCategory.X == system Category.Id. Analytics, importer and matcher are unchanged until PR 2.category/targetCategorystrings are still returned and accepted, andcategoryIdwins when both are sent. Today's frontend keeps working. The legacy fields are removed in PR 5.Tested
dotnet test: 176/176 (20 new: CRUD, validation, system rows locked, user B cannot read, edit, delete or assign user A's category, delete fallback, legacy JSON, filter).dotnet buildanddotnet format --verify-no-changes: clean.CategoryId1/25/57 with the matching keys, rule Food → 2;Down()restores 0/24/56, and the migration re-applies cleanly.Out of scope (next PRs)
🤖 Generated with Claude Code