I am writing a RESTfull API with Spring boot using Maven Liquibase to manage migrations alongside MySQL 8 for the database.
I have searched online (1,2, 3) but Liquibase is still generating "TINYBLOB" type in migrations instead of "POINT" or "GEOMETRY". Surprisingly, when I edit the migration file (i.e. changeSet and use "POINT", mvn liquibase:update
still creates a TINYBLOB
column on the database.
I have a typal JPA entity:
import org.locationtech.jts.geom.Point;
@Entity
class MyModel {
private Point location;
// more fields
I am using Liquibase version 4.3 and Hibernate version 5.4. For hibernate dialect, I am using org.hibernate.spatial.dialect.mysql.MySQL8SpatialDialect
.
It appears to me that spatial types are not supposed by Liquibase... but that would be surprising. Any help would be greatly appreciated (all other data types are behaving as expected).