Just use jsonb as the type:
- <column name="doc" type="jsonb"/>
<bean id="liquibase" class="liquibase.integration.spring.SpringLiquibase">
<property name="dataSource" ref="dataSource"/>
<property name="changeLog" value="classpath:db-changelog.xml" />
</bean>
<databaseChangeLog>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<includeAll path="classpath:sql/" />
</databaseChangeLog>
.
├── Module1
│ ├── src
│ │ └── main
│ │ └── resources
│ │ ├── db-changelog.xml
│ │ └── sql
│ │ ├── 001-test.sql
│ │ └── 002-test.sql
│ └── target
│ ├── classes
│ │ ├── db-changelog.xml
│ │ └── sql
│ │ ├── 001-test.sql
│ │ └── 002-test.sql
│ └── Module1-1.0-SNAPSHOT.jar
|
└─ Module2
├── src
│ └── main
│ └── resources
│ ├── applicationContext.xml
│ └── mybatis-config.xml
└── target
├── classes
│ ├── applicationContext.xml
│ └── mybatis-config.xml
└── Module2-1.0-SNAPSHOT.jar
INFO 30.11.15 01:05: liquibase: Successfully acquired change log lock
WARNING 30.11.15 01:05: liquibase: included file classpath:db-changelog.xml/ is not a recognized file type
Working
.
├── Module1
│ ├── src
│ │ └── main
│ │ └── resources
│ └── target
│ ├── classes
│ │ └── oceniarka
│ └── Module1-1.0-SNAPSHOT.jar
│
└── Module2
├── src
│ └── main
│ └── resources
│ ├── applicationContext.xml
│ ├── db-changelog.xml
│ ├── mybatis-config.xml
│ └── sql
│ ├── 001-test.sql
│ └── 002-test.sql
└── target
├── classes
│ ├── applicationContext.xml
│ ├── db-changelog.xml
│ ├── mybatis-config.xml
│ └── sql
│ ├── 001-test.sql
│ └── 002-test.sql
└── Module2-1.0-SNAPSHOT.jar
INFO 30.11.15 01:14: liquibase: Successfully acquired change log lock
WARNING 30.11.15 01:14: liquibase: included file classpath:db-changelog.xml/ is not a recognized file type
INFO 30.11.15 01:14: liquibase: Reading from oceniarka.DATABASECHANGELOG
INFO 30.11.15 01:14: liquibase: classpath:db-changelog.xml: sql/002-test.sql::raw::includeAll: Custom SQL executed
INFO 30.11.15 01:14: liquibase: classpath:db-changelog.xml: sql/002-test.sql::raw::includeAll: ChangeSet sql/003-test.sql::raw::includeAll ran successfully in 17ms
This happens for reading sql or xml files both. Problem exists only for running application from jar. I would classify this as a bug because spring properly recognize db-changelog.xml in other module, but master changelog cannot reference sql directory with "include all". I think this is happens because liquibase use some module relative variable for recognizing path.
Referencing files from another module by including one-by-one ("include file" instead "includeAll") works fine. I would be very grateful for fixing the bug or some workaround. Also sorry for my english and formatting (it looks like i seriously messed up something in html).
This is required by the SQL standard: unquoted identifiers have to be stored in uppercase and they have to be case-insensitive.Several databases do things like that - automatically convert the case of all table names, etc. written to the database to either uppercase or lowercase
Is it possible that the MySQL mode for the HSQLDB is treated differently for the in memory DB vs file based DB?
The following changeset works fine when executing against the in memory HSLDB but fails when run against file based HSQLDB.
In both cases I'm specifying: sql.syntax_mys=true as the connection param.<changeSet author="sb" id="changeSet_id">
<createTable tableName="SAMPLE_TABLE">
<column name="KEY" type="VARCHAR(255)">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="VALUE" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>When executed against filebased HSQLDB then it complains that 255 is incorrect character.Basically the name of the column "Key" is not getting escaped which does happen when run against in memory HSQLDB.I'm using HSQLDB v 2.3.3 and Liquibase-maven-plugin v3.4.1 to apply schema changes.