Rubocop amended the query in #5236, which led to failure as the Message model already has a default scope. This PR fixes it.
- Remove the cascading foreign key indexes - Add migration to clean up existing objects fixes: #4285