This commit is contained in:
James Cole
2023-01-16 06:54:57 +01:00
parent d4f1b9a1bc
commit a753fde2f1
3 changed files with 13 additions and 5 deletions

View File

@@ -46,5 +46,8 @@ class CategoryDestroyService
// also delete all relations between categories and transactions:
DB::table('category_transaction')->where('category_id', (int)$category->id)->delete();
// delete references to category from recurring transactions.
DB::table('rt_meta')->where('name', 'category_id')->where('value', $category->id)->delete();
}
}