How to define the index length for a domain attribute in Grails 5 with MySQL? [duplicate]
MySQL with InnoDB has a max index length it allows. If a String field in a Grails domain class has a maxSize: 2048 constraint, then an index on that field won't be created in MySQL, even if it's defined in the mapping DSL:
static constraints = {
archetypePath(maxSize: 2048)
}
static mapping = {
tablePerHierarchy false
archetypeId index: 'aid,aidpath'
archetypePath index: 'aidpath'
}
When I check my table, there is no index including the archetypePath...