Ping <https://grails.slack.com/archives/C07M0GTDE/...
# questions
s
I dont think there is a DSL for it. In our case, I simply ran dbm-gorm-diff as normal and edited the changeset to replace the standard create index with a custom sql
Copy code
<sql><![CDATA[CREATE INDEX company_name_idx ON company(name(128))]]></sql>
<!--      <createIndex indexName="company_name_idx" tableName="company">
//       <column name="name"/>
//    </createIndex>-->
p
Thanks @Stephen Lynch this might be a shortcoming for the GORM mapping DSL since index creation is a basic ORM requirement IMHO
s
The underlying issue though is the fact that liquibase doesn't support the ability to specify index lengths in their schema. If this was implemented in gorm, it would have to generate raw sql which may not work for all RDBMS
p
@Stephen Lynch is liquibase used by GORM for the domain mapping DSL? I thought it has to do only with the DB migration plugin. If I'm not using DB migration, is it still used to generate indexes from domain mapping DSL?