Skip to content

fix: drop unique index on mail_messages_snoozed.message_id #8800

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

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

JohannesGGE
Copy link
Contributor

Fix: #8748

Followup to #8694

I had to rewrite the snooze db insert. Pls check if the throwing of the ServiceException is correct, I'm not quite sure.

throw $e;
}

$messageId = $message['messageId'];
Copy link
Contributor

Choose a reason for hiding this comment

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

Why would findMessageIdsByThreadRoot return null for messageId?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, messageId shouldn't be null. I just adapted the pattern from the $message->getMessageId(); where the null check was needed.

}

$this->messageSnoozeMapper->deleteByMessageIds(array($messageId));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->messageSnoozeMapper->deleteByMessageIds(array($messageId));
$this->messageSnoozeMapper->deleteByMessageIds([$messageId]);

}

$this->messageSnoozeMapper->deleteByMessageIds(array($messageId));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->messageSnoozeMapper->deleteByMessageIds(array($messageId));
$this->messageSnoozeMapper->deleteByMessageIds([$messageId]);

Signed-off-by: Johannes Merkel <mail@johannesgge.de>
@kesselb kesselb merged commit d1d686a into main Aug 24, 2023
@kesselb kesselb deleted the fix-snooze-index branch August 24, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App upgrade triggered by upgrade to Nextcloud v27.0.2 fails with SQL Error
2 participants