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

🐛 GetUserUnreadChannels に LIMIT 1;を追加 #2133

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

pikachu0310
Copy link
Contributor

@pikachu0310
Copy link
Contributor Author

			(
				SELECT message_id
				FROM unreads
				WHERE user_id = MIN(u.user_id)
					AND channel_id = u.channel_id
					AND message_created_at = MIN(u.message_created_at)
			) AS oldest_message_id

が1個じゃなかったときにエラーが起きていた。つまり、全く同じmessage_created_atがunreadsにあれば起きる。LIMIT 1を付けることで解決。

@pikachu0310 pikachu0310 self-assigned this Dec 5, 2023
@pikachu0310
Copy link
Contributor Author

Copy link
Member

@logica0419 logica0419 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
助かった

@pikachu0310 pikachu0310 merged commit 1da1eb7 into master Dec 5, 2023
5 checks passed
@pikachu0310 pikachu0310 deleted the fix-GetUserUnreadChannels branch December 5, 2023 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants