SonarQube 5.2升级到5.3时无法执行删除索引唯一模式迁移

SonarQube 5.2升级到5.3时无法执行删除索引唯一模式迁移,sonarqube,upgrade,Sonarqube,Upgrade,我曾尝试在一个运行Windows 2008 R2 SP1的系统上进行升级,尝试多次后出现相同的错误。我们现在已经回滚到5.2。实际错误是:java.lang.IllegalStateException:无法在模式迁移上执行DROP INDEX unique_schema_迁移 以下是日志文件的一部分,以导致升级失败的错误结尾: found an existing binding; you may want to run a clean build. WARNING: while

我曾尝试在一个运行Windows 2008 R2 SP1的系统上进行升级,尝试多次后出现相同的错误。我们现在已经回滚到5.2。实际错误是:java.lang.IllegalStateException:无法在模式迁移上执行DROP INDEX unique_schema_迁移

以下是日志文件的一部分,以导致升级失败的错误结尾:

    found an existing binding; you may want to run a clean build.
    WARNING: while creating new bindings for class org.jruby.rack.RackInput,
    found an existing binding; you may want to run a clean build.
    2016.01.14 17:27:41 INFO  app[o.s.p.m.Monitor] Process[web] is up
    2016.01.14 17:28:01 INFO  web[o.s.s.d.m.PlatformDatabaseMigration]          
    Starting DB Migration
    2016.01.14 17:28:02 INFO  web[DbMigration] ==  CreateUserTokens:   migrating ===============================================
    2016.01.14 17:28:02 INFO  web[DbMigration] -- create_table("user_tokens", {})
    2016.01.14 17:28:02 INFO  web[DbMigration]    -> 0.0310s
    2016.01.14 17:28:02 INFO  web[DbMigration]    -> 0 rows
    2016.01.14 17:28:02 INFO  web[DbMigration] -- index_exists?("user_tokens", "token_hash", {:name=>"user_tokens_token_hash"})
    2016.01.14 17:28:02 INFO  web[DbMigration]    -> 0.0310s
    2016.01.14 17:28:02 INFO  web[DbMigration] -- add_index("user_tokens", "token_hash", {:name=>"user_tokens_token_hash", :unique=>true})
    2016.01.14 17:28:02 INFO  web[DbMigration]    -> 0.0160s
    2016.01.14 17:28:02 INFO  web[DbMigration]    -> 0 rows
    2016.01.14 17:28:02 INFO  web[DbMigration] -- index_exists?("user_tokens", ["login", "name"], {:name=>"user_tokens_login_name"})
    2016.01.14 17:28:02 INFO  web[DbMigration]    -> 0.0000s
    2016.01.14 17:28:02 INFO  web[DbMigration] -- add_index("user_tokens", ["login", "name"], {:name=>"user_tokens_login_name", :unique=>true})
    2016.01.14 17:28:02 INFO  web[DbMigration]    -> 0.0000s
    2016.01.14 17:28:02 INFO  web[DbMigration]    -> 0 rows
    2016.01.14 17:28:02 INFO  web[DbMigration] ==  CreateUserTokens: migrated (0.0780s) ======================================
    2016.01.14 17:28:02 INFO  web[DbMigration] 
    2016.01.14 17:28:02 INFO  web[DbMigration] ==  FixSizeOfSnapshotsQualifier: migrating ====================================
    2016.01.14 17:28:02 INFO  web[DbMigration] -- remove_index(:snapshots, {:name=>"snapshots_qualifier"})
    2016.01.14 17:28:02 INFO  web[DbMigration]    -> 0.0160s
    2016.01.14 17:28:02 INFO  web[DbMigration]    -> 0 rows
    2016.01.14 17:28:02 INFO  web[DbMigration] -- change_column("snapshots", "qualifier", :string, {:limit=>10, :null=>true})
    2016.01.14 17:28:02 INFO  web[DbMigration]    -> 0.0000s
    2016.01.14 17:28:02 INFO  web[DbMigration] -- index_exists?(:snapshots, :qualifier, {:name=>"snapshots_qualifier"})
    2016.01.14 17:28:02 INFO  web[DbMigration]    -> 0.0000s
    2016.01.14 17:28:02 INFO  web[DbMigration] -- add_index(:snapshots, :qualifier, {:name=>"snapshots_qualifier"})
    2016.01.14 17:28:02 INFO  web[DbMigration]    -> 0.2500s
    2016.01.14 17:28:02 INFO  web[DbMigration]    -> 0 rows
    2016.01.14 17:28:02 INFO  web[DbMigration] ==  FixSizeOfSnapshotsQualifier: migrated (0.2810s) ===========================
    2016.01.14 17:28:02 INFO  web[DbMigration] 
    2016.01.14 17:28:02 INFO  web[DbMigration] ==  FixMssqlCollation: migrating ==============================================
    2016.01.14 17:28:02 INFO  web[o.s.d.v.v.FixMsSqlCollation] Updating columns from table characteristics
    2016.01.14 17:28:02 INFO  web[o.s.d.v.v.FixMsSqlCollation] Updating columns from table rules_parameters
    2016.01.14 17:28:02 INFO  web[o.s.d.v.v.FixMsSqlCollation] Updating columns from table rules_profiles
    2016.01.14 17:28:02 INFO  web[o.s.d.v.v.FixMsSqlCollation] Updating columns from table project_qprofiles
    2016.01.14 17:28:02 INFO  web[o.s.d.v.v.FixMsSqlCollation] Updating columns from table widgets
    2016.01.14 17:28:02 INFO  web[o.s.d.v.v.FixMsSqlCollation] Updating columns from table groups
    2016.01.14 17:28:02 INFO  web[o.s.d.v.v.FixMsSqlCollation] Updating columns from table snapshots
    2016.01.14 17:28:02 INFO  web[o.s.d.v.v.FixMsSqlCollation] Updating columns from table schema_migrations
    2016.01.14 17:28:02 ERROR web[o.s.s.d.m.DatabaseMigrator] Fail to execute database migration: org.sonar.db.version.v53.FixMsSqlCollation
    java.lang.IllegalStateException: Fail to execute DROP INDEX unique_schema_migrations ON schema_migrations
at org.sonar.db.version.DdlChange$Context.execute(DdlChange.java:70) ~[sonar-db-5.3.jar:na]
提前感谢,,
Wes MacDonald

看起来5.2版本中缺少索引。要解决此问题,请在5.2数据库上为表架构_迁移创建索引。这是命令

在dbo.schema\u迁移(版本)上创建唯一聚集索引UNIQUE\u schema\u迁移

在此修复之后,我完成了从5.2到5.3的迁移