Getting error while migrating Sonarqube data from MYSQL DB to Postgresql DB

Hi,
Getting the following error while upgrading DB. Can someone please suggest what might be the issue and how can we fix this?

2020.08.17 12:17:03 ERROR web[][DbMigrations] #1 'Create initial schema': failure | time=13ms
2020.08.17 12:17:03 ERROR web[][DbMigrations] Executed DB migrations: failure | time=16ms
2020.08.17 12:17:03 ERROR web[][o.s.s.p.PlatformImpl] Web server startup failed
org.sonar.server.platform.db.migration.step.MigrationStepExecutionException: Execution of migration step #1 'Create initial schema' failed
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:79)
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:67)
        at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:405)
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:52)
        at org.sonar.server.platform.db.migration.engine.MigrationEngineImpl.execute(MigrationEngineImpl.java:68)
        at org.sonar.server.platform.db.migration.AutoDbMigration.start(AutoDbMigration.java:40)
        at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
        at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
        at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
        at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
        at org.picocontainer.behaviors.Stored.start(Stored.java:110)
        at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
        at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
        at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
        at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
        at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
        at org.sonar.server.platform.PlatformImpl.startSafeModeContainer(PlatformImpl.java:205)
        at org.sonar.server.platform.PlatformImpl.doStart(PlatformImpl.java:105)
        at org.sonar.server.platform.PlatformImpl.doStart(PlatformImpl.java:96)
        at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:44)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4689)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5155)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
        at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Fail to execute CREATE TABLE active_rule_parameters (id SERIAL NOT NULL,active_rule_id INTEGER NOT NULL,rules_parameter_id INTEGER NOT NULL,value VARCHAR (4000) NULL,rules_parameter_key VARCHAR (128) NULL, CONSTRAINT pk_active_rule_parameters PRIMARY KEY (id))
        at org.sonar.server.platform.db.migration.step.DdlChange$ContextImpl.execute(DdlChange.java:106)
        at org.sonar.server.platform.db.migration.step.DdlChange$ContextImpl.execute(DdlChange.java:86)
        at org.sonar.server.platform.db.migration.step.DdlChange$ContextImpl.execute(DdlChange.java:128)
        at org.sonar.server.platform.db.migration.version.v00.CreateInitialSchema.createActiveRuleParameters(CreateInitialSchema.java:156)
        at org.sonar.server.platform.db.migration.version.v00.CreateInitialSchema.execute(CreateInitialSchema.java:88)
        at org.sonar.server.platform.db.migration.step.DdlChange.execute(DdlChange.java:45)
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:75)
        ... 29 common frames omitted
Caused by: org.postgresql.util.PSQLException: ERROR: relation "active_rule_parameters" already exists
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2532)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2267)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:312)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:448)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:369)
        at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:310)
        at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:296)
        at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:273)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:268)
        at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194)
        at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194)
        at org.sonar.server.platform.db.migration.step.DdlChange$ContextImpl.execute(DdlChange.java:91)
        ... 35 common frames omitted

We have already tried the steps mentioned in the following doc

Hi,

Welcome to the community!

From the error in your log (Execution of migration step #1 'Create initial schema' failed), It looks like you’re just getting started with SonarQube. I recommend you wipe your DB schema and start over. It sounds like things have gotten muddled.

 
Ann