lunar icon indicating copy to clipboard operation
lunar copied to clipboard

Removing currency throws error

Open morawcik opened this issue 8 months ago • 1 comments

  • Lunar version: 1.x
  • Laravel Version: 11.x
  • PHP Version: 8.2

When I'm trying to delete one currency (I have 3 right now) I'm getting this:

SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`myperfectday`.`lunar_prices`, CONSTRAINT `lunar_prices_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `lunar_currencies` (`id`))

delete from `lunar_currencies` where `id` = 3

I would expect that it will remove prices for this currency or in the "lazy version" just got message that this is not allowed.

morawcik avatar May 26 '24 12:05 morawcik