[GH-ISSUE #2619] Multiple Foreign keys are failing because of wrong datatype #1660

Closed
opened 2026-02-27 11:18:26 +03:00 by kerem · 1 comment
Owner

Originally created by @noaharkbs on GitHub (Sep 29, 2022).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2619

Impacted versions

  • OS Type: Debian
  • OS Version: 11.5
  • Database Type: MariaDB
  • Database version: 10.5
  • Modoboa: 2.0.2
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

  • mysqldump --skip-compact [database] | mysql [newdatabase]

Current behavior

  • Example:
    ERROR 1005 (HY000) at line 984: Can't create table `modoboa_contacts_category` (errno: 150 "Foreign key constraint is incorrectly formed")

Problems are the wrong datatype at the contraints on tables, i.E.:

  • modoboa_contacts_category.user_id int(11)
  • modoboa_contacts_addressbook.user_id int(11)

user_id has a constraint to core_user.id which is a bigint(20).

Expected behavior

  • the tables with user_id which has a constraint to core_user.id should has user_id as bigint(20) too
Originally created by @noaharkbs on GitHub (Sep 29, 2022). Original GitHub issue: https://github.com/modoboa/modoboa/issues/2619 # Impacted versions * OS Type: Debian * OS Version: 11.5 * Database Type: MariaDB * Database version: 10.5 * Modoboa: 2.0.2 * installer used: Yes * Webserver: Nginx # Steps to reproduce - mysqldump --skip-compact [database] | mysql [newdatabase] # Current behavior - Example: ```ERROR 1005 (HY000) at line 984: Can't create table `modoboa_contacts_category` (errno: 150 "Foreign key constraint is incorrectly formed") ``` Problems are the wrong datatype at the contraints on tables, i.E.: - modoboa_contacts_category.user_id int(11) - modoboa_contacts_addressbook.user_id int(11) **user_id has a constraint to core_user.id which is a bigint(20).** # Expected behavior - the tables with user_id which has a constraint to core_user.id should has user_id as bigint(20) too
kerem 2026-02-27 11:18:26 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@stale[bot] commented on GitHub (Dec 3, 2022):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

<!-- gh-comment-id:1336101378 --> @stale[bot] commented on GitHub (Dec 3, 2022): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
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#1660
No description provided.