You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently messageBody and messageReceive are auto-incrementing BIGINT unsigned primary keys (messageId). This is incorrect.
messageSend should have the only auto-incrementing primary key of these three tables, as inserting into messageSend determines the messageId for the other two tables. A message should always be inserted into messageSend before either of the other two tables, and this can be enforced by the API.
The solution is to make messageId on messageBody and messageReceive a BIGINT unsigned primary key and foreign key to messageSend.messageId.
This is not a huge bug, and the API is 100% functional without fixing it, but the fix would help the database self-enforce constraints better.
The text was updated successfully, but these errors were encountered:
Currently
messageBody
andmessageReceive
are auto-incrementing BIGINT unsigned primary keys (messageId
). This is incorrect.messageSend
should have the only auto-incrementing primary key of these three tables, as inserting intomessageSend
determines themessageId
for the other two tables. A message should always be inserted intomessageSend
before either of the other two tables, and this can be enforced by the API.The solution is to make
messageId
onmessageBody
andmessageReceive
a BIGINT unsigned primary key and foreign key tomessageSend.messageId
.This is not a huge bug, and the API is 100% functional without fixing it, but the fix would help the database self-enforce constraints better.
The text was updated successfully, but these errors were encountered: