Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

カテゴリが対象のクーポンを作成後、クーポンを削除すると、紐付けたカテゴリが削除できない #147

Open
chihiro-adachi opened this issue Nov 8, 2021 · 1 comment
Labels

Comments

@chihiro-adachi
Copy link
Contributor

概要

カテゴリが対象のクーポンを作成後、クーポンを削除すると、紐付けたカテゴリが削除できない

詳細

plg_coupon_detailにレコードが残っており、外部キー制約に引っかかるため。

再現手順

  • カテゴリAを作成
  • カテゴリAが対象のクーポンを作成
  • クーポンを削除
  • カテゴリAを削除 -> 関連するデータがあるため「カテゴリA」を削除できませんでしたのメッセージが表示される
@chihiro-adachi
Copy link
Contributor Author

chihiro-adachi commented Sep 5, 2023

クーポン削除時に、plg_coupon_detail.category_idをnullにするなど、カテゴリの紐づけが解除されるとよい

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant