From: Simon Brandhof Date: Fri, 4 Oct 2013 12:59:58 +0000 (+0200) Subject: SONAR-4736 fix freeze on MSSQL X-Git-Tag: 4.0~233 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=953921932fc67fc72a88ed0d49992d51f4ac8ae3;p=sonarqube.git SONAR-4736 fix freeze on MSSQL --- diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/401_migrate_violations_to_issues.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/401_migrate_violations_to_issues.rb index 480eb03a696..f4e0c01c1fc 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/401_migrate_violations_to_issues.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/401_migrate_violations_to_issues.rb @@ -29,6 +29,9 @@ class MigrateViolationsToIssues < ActiveRecord::Migration remove_index_quietly('rule_failure_rule_id') remove_index_quietly('rf_permanent_id') + # Required for MSSQL to unlock the table RULE_FAILURES + ActiveRecord::Base.connection.commit_db_transaction + Java::OrgSonarServerUi::JRubyFacade.getInstance().databaseMigrator().executeMigration('org.sonar.server.db.migrations.violation.ViolationMigration') # Currently not possible in Java because of Oracle (triggers and sequences must be dropped)