When upgrading Sonar from a version below 2.13, it will update the current Sonar database to the new format. If something goes wrong whilst Sonar is upgrading, Sonar won't clean up for you and you'll have to either restore a backup or cleanup yourself before upgrading again.
To cleanup manually, run the following commands on the database:
DROP TABLE reviews, review_comments, active_rule_changes, active_rule_param_changes, manual_measures, notifications, duplications_index; DROP TABLE loaded_templates, resource_index, action_plans, action_plans_reviews, active_rule_notes, rule_notes;
Sonar might not have created all the tables if it didn't get far enough, but the commands should still execute as far as possible.