2

In my JDL file I have a file with the following contents

entity Application {
...
text String,
...

}

When the XML file is generated for liquibase the MySQL data type is set to varchar(255) by default, I want to have text or mediumtext as the type instead.

 <column name="text" type="text">
            <constraints nullable="true" />
  </column>

How can I accomplish this?

Chol Nhial
  • 1,327
  • 1
  • 10
  • 25

1 Answers1

4

Use JDL's TextBlob type for longer strings. That uses the clob Liquibase type which is mapped to longtext or text depending on the database.

entity Application {
    text TextBlob
}

https://www.jhipster.tech/jdl/#blobdeclaration

Jon Ruddell
  • 6,244
  • 1
  • 22
  • 40