我使用H2进行与Liquibase的集成测试,似乎存在兼容性问题。
一个简单的更改列函数不会传递给H2,因为它在MySQL发行版上完美运行。
这是查询:
ALTER TABLE `designs` ALTER COLUMN `description` `description` TEXT NULL DEFAULT NULL AFTER `created`;
错误:
2014-06-07 14:27:05,708 [DEBUG] [NewPooledConnection,handleThrowable(),430] - com.mchange.v2.c3p0.impl.NewPooledConnection@78af2ac3 handling a throwable. org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "ALTER TABLE DESIGNS ALTER COLUMN DESCRIPTION TEXT NULL DEFAULT NULL AFTER[*] CREATED "; SQL statement: ALTER TABLE designs ALTER COLUMN description TEXT NULL DEFAULT NULL AFTER created [42000-178] at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
一些配置:
repository.connectionString = jdbc:h2:mem:db;MODE=MySQL;DB_CLOSE_ON_EXIT=FALSE repository.driver = org.h2.Driver repository.username = sa repository.password =
任何想法如何解决这个问题?据我所知H2应该与Mysql兼容