We are trying to use liquibase 2.0 in our project and are running into some issues.
First of all, thanx to the liquibase dev. community on an excellent product.
We are using liquibase with jboss 5.1.0 on both hypersonic and db2. On hypersonic I am using the default datasource configuration that comes with the jboss
product with the url jdbc:hsqldb:hsql://localhost:1701 . We use hibernate and for hibernate to use a different schema (than public which is default) there
are some -D arguments that we use -Dhibernate.default_schema which works fine.
The problem is that with liquibase it is not able to use the schema that we set, even if i set -DdefaultSchemaName or -Ddatabase.defaultSchemaName in my
jboss VM arguments . The liquibase tables are still getting created in PUBLIC schema. On command line this works fine , for eg. if i set --defaultSchemaName it works fine but not in jboss.
The only work around that i found is using these in the changeset and tgus creates our tables in the right schema but the liquibase tables are not getting created there.
1.How do i set up liquibase so that it uses the default schema name that we give in jboss as jvm args ?
2.I want liquibase to use the connection that is created with the datasource be it create table or any other ddl commands.
We are running liquibase in a spring container… Following is our configuration
ApplicationContext.xml
=================
liquibase.xml
===========
<?xml version="1.0" encoding="UTF-8"?><beans xmlns=“http://www.springframework.org/schema/beans”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:context=“http://www.springframework.org/schema/context”
xmlns:tx=“http://www.springframework.org/schema/tx”
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd ">
detectNonLiquibaseInstall.xml reads as follows
SELECT COALESCE(MAX(id),’-1’)
FROM databasechangelog
WHERE author=‘AppVersion’
// this is an application table …
Thx
Vaidya