[GH-ISSUE #603] SQL error on quota recalc #565

Closed
opened 2026-02-27 11:12:25 +03:00 by kerem · 0 comments
Owner

Originally created by @tonioo on GitHub (Sep 17, 2014).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/603

Originally assigned to: @tonioo on GitHub.

When MySQL is in use and the following command is executed:

$ doveadm quota recalc -A

dovecot tries to remove existing admin_quota records before updating them. Unfortunately, the following error is raised:

dict: Error: sql dict: commit failed: Cannot delete or update a parent row: a foreign key constraint fails (mailng.admin_mailbox, CONSTRAINT quota_value_id_refs_username_65a4e03cdef957bf FOREIGN KEY (quota_value_id) REFERENCES admin_quota (username))

It is due to the foreign key between admin_mailbox and admin_quota which prevents the deletion.

Originally created by @tonioo on GitHub (Sep 17, 2014). Original GitHub issue: https://github.com/modoboa/modoboa/issues/603 Originally assigned to: @tonioo on GitHub. When MySQL is in use and the following command is executed: ``` sh $ doveadm quota recalc -A ``` dovecot tries to remove existing admin_quota records before updating them. Unfortunately, the following error is raised: `dict: Error: sql dict: commit failed: Cannot delete or update a parent row: a foreign key constraint fails (`mailng`.`admin_mailbox`, CONSTRAINT `quota_value_id_refs_username_65a4e03cdef957bf` FOREIGN KEY (`quota_value_id`) REFERENCES `admin_quota` (`username`))` It is due to the foreign key between admin_mailbox and admin_quota which prevents the deletion.
kerem 2026-02-27 11:12:25 +03:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#565
No description provided.