Liquibase spanner migrations are failing to execute

The command im running

liquibase --changeLogFile /liquibase/lib/changelog.xml --defaults-file spannerliq.properties --url “jdbc:cloudspanner:/projects/projectid/instances/instancename/databases/dbname” --log-level debug update

errors i encounter are:

INFO [liquibase.database] Error getting default schema
liquibase.exception.DatabaseException: Error executing SQL call current_schema: Callable statements are not supported
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:139)

Caused by: liquibase.exception.SetupException: Could not find directory, directory was empty, or no changelogs matched the provided search criteria for includeAll ‘/sql/tmp/spanner/projectid/instanceid/db/’

Here is my properties file

cat spannerliq.properties

changelogFile=changelog.xml
searchpath=/liquibase
driver=com.google.cloud.spanner.jdbc.JdbcDriver
classpath=/liquibase/liquibase-spanner-4.25.0-all.jar

changelog.xml

<?xml version="1.0" encoding="UTF-8"?>



Hi @jarchana,

This error is because you are specifying a searchPath (searchpath=/liquibase), but the includeAll directory is is not a subdirectory of the specified in the searchPath. If your changelog file is under /liquibase directory try placing your /sql/tmp/spanner/projectid/instanceid/db/ there as well.

Thanks,
Daniel.

1 Like