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

messageId column is wrong type for messageBody and messageReceive #1

Open
mikeholler opened this issue Nov 26, 2013 · 0 comments
Open
Assignees
Labels
Milestone

Comments

@mikeholler
Copy link
Owner

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.

@mikeholler mikeholler reopened this Nov 26, 2013
@ghost ghost assigned mikeholler Nov 26, 2013
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