Hi,

I am using Kettle api to manage kettle job with database repository. I am creating repository schema on application startup. But I could not find api which checks repository for given connection information is present or not. Is there any API which gives this information?
In PDI CE 4.4, I can create repository schema on application startup in which internally Kettle checks if schema is present skips table creation, if not creates tables. But in 5.0.1-stable edition, I am getting following error.
Code:
org.pentaho.di.core.exception.KettleException: Unable to insert new version log record into kettletest.R_VERSION


Couldn't execute SQL: INSERT INTO kettletest.R_VERSION VALUES(?, ?, ?, ?, ?)


ERROR: column "upgrade_date" is of type timestamp without time zone but expression is of type boolean
  Hint: You will need to rewrite or cast the expression.
  Position: 57




    at org.pentaho.di.repository.kdr.KettleDatabaseRepositoryCreationHelper.createRepositorySchema(KettleDatabaseRepositoryCreationHelper.java:204)
    at org.pentaho.di.repository.kdr.KettleDatabaseRepository.createRepositorySchema(KettleDatabaseRepository.java:1386)
    at ###.createRepository(###.java:386)
    at ###.initTestSuite(###.java:83)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
    at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:175)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:107)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    at org.testng.SuiteRunner.run(SuiteRunner.java:240)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1203)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1128)
    at org.testng.TestNG.run(TestNG.java:1036)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: org.pentaho.di.core.exception.KettleDatabaseException: 
Couldn't execute SQL: INSERT INTO kettletest.R_VERSION VALUES(?, ?, ?, ?, ?)


ERROR: column "upgrade_date" is of type timestamp without time zone but expression is of type boolean
  Hint: You will need to rewrite or cast the expression.
  Position: 57


    at org.pentaho.di.core.database.Database.execStatement(Database.java:1432)
    at org.pentaho.di.repository.kdr.KettleDatabaseRepositoryCreationHelper.createRepositorySchema(KettleDatabaseRepositoryCreationHelper.java:199)
    ... 27 more
Caused by: org.postgresql.util.PSQLException: ERROR: column "upgrade_date" is of type timestamp without time zone but expression is of type boolean
  Hint: You will need to rewrite or cast the expression.
  Position: 57
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:410)
    at org.pentaho.di.core.database.Database.execStatement(Database.java:1399)
    ... 28 more
Any solution to solve this issue will help.

Thanks,
Deepak