Skip to content

Feat: Category and Account deletion#524

Open
lucaantonelli wants to merge 6 commits intoRIP-Comm:mainfrom
lucaantonelli:feat-handle-category-deletion
Open

Feat: Category and Account deletion#524
lucaantonelli wants to merge 6 commits intoRIP-Comm:mainfrom
lucaantonelli:feat-handle-category-deletion

Conversation

@lucaantonelli
Copy link
Copy Markdown
Collaborator

🎯 Description

Handle categories and accounts deletion correctly. Add a deleted_at field on both tables.

Closes: #177

📱 Changes

  • Add migration for deleted_at fields in categories and bank accounts tables
  • Implement soft delete, to avoid breaking transactions.

🧪 Testing Instructions

  • Test deleting both categories and accounts, check if everything is still working.

🔍 Checklist for reviewers

  • Code is formatted correctly
  • Tests are passing
  • New tests are added (if needed)
  • Style matches the figma/designer requests
  • Tested on:
    • iOS
    • Android

Copy link
Copy Markdown
Collaborator

@theperu theperu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! There are a few things that I noticed:

  1. The migration version is 6 instead of 7
  2. When I delete a category there is no dialog similar to the one that we have for the accounts
  3. When I delete a category that has a recurring transaction associated the category is deleted but the recurring transaction is not
  4. When I delete an account that has a recurring transaction associated the account is deleted but the recurring transaction widget does not update until I close and reopen the app
  5. When I delete an account that is set as main account it gets deleted but I still see it as the default option when I add a new transaction (this probably happens also to the counts towards net worth BTW)
  6. When I delete a category/subcategory I still see it in the list of possible categories when I add a new transaction, the list updates after closing and reopening the app
  7. If I delete a category that has a budget when I go back to the planning page I see an error

@lucaantonelli lucaantonelli requested a review from theperu March 31, 2026 14:01
@lucaantonelli
Copy link
Copy Markdown
Collaborator Author

Hi! There are a few things that I noticed:

  1. The migration version is 6 instead of 7
  2. When I delete a category there is no dialog similar to the one that we have for the accounts
  3. When I delete a category that has a recurring transaction associated the category is deleted but the recurring transaction is not
  4. When I delete an account that has a recurring transaction associated the account is deleted but the recurring transaction widget does not update until I close and reopen the app
  5. When I delete an account that is set as main account it gets deleted but I still see it as the default option when I add a new transaction (this probably happens also to the counts towards net worth BTW)
  6. When I delete a category/subcategory I still see it in the list of possible categories when I add a new transaction, the list updates after closing and reopening the app
  7. If I delete a category that has a budget when I go back to the planning page I see an error

Hi, all the problem should be fixed, i couldn't replicate the problem at point 5, on my end is working correctly. I also found an error in budgets, if you create a budget and delete it then when recreating it for same category doesn't show anymore because active still remain false when updating, i should have fixed this as well.

Copy link
Copy Markdown
Collaborator

@theperu theperu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucaantonelli I still see a couple of issues:

  • I can't delete subcategories
  • If I open the new transaction page, open the list of categories, then I go to settings and delete a category when I come back to add a transaction again I still see the deleted category in the list
  • When an account is deleted I would set the countNetWorth to false to avoid future issues with it

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.

Bug when deleting a category

2 participants