Hi
I have a composite application where MS SQL Server is used as a database. Now I have to run another instance of the application PostgreSQL instead. I am creating the database from the studio instead of migrating the SQL server database. The empty database is created as expected but there are several index scripts generated by the studio for which I get the following exception “already exists”. How can this be managed?
Caused by: liquibase.exception.DatabaseException: ERROR: relation "idx_hrallowancerate_calcmethod" already exists [Failed SQL: (0) CREATE INDEX IDX_HRALLOWANCERATE_CALCMETHOD ON public.HR_ALLOWANCE_RATE_PAYROLL_GROU(CALC_METHOD_ID)]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:445)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:77)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:160)
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1270)
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1252)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:702)
... 51 more
Caused by: org.postgresql.util.PSQLException: ERROR: relation "idx_hrallowancerate_calcmethod" already exists
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2401)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:368)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:498)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:415)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:335)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:321)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:297)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:292)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:441)
... 56 more
Platform 2.1.1
Studio: 2.1.999
PostgreSQL database: v16
Looks like database scripts are not created properly, how can I fix this?