Class DefaultConstraintMaxLength

java.lang.Object
io.ebeaninternal.dbmigration.ddlgeneration.platform.DefaultConstraintMaxLength
All Implemented Interfaces:
io.ebean.config.DbConstraintNaming.MaxLength

public class DefaultConstraintMaxLength extends Object implements io.ebean.config.DbConstraintNaming.MaxLength
Default implementation used to truncate or shorten db constraint names as required.
  • Constructor Details

  • Method Details

    • maxLength

      public String maxLength(String constraintName, int count)
      Apply a maximum length to the constraint name.

      This implementation should work well apart from perhaps DB2 where the limit is 18.

      Specified by:
      maxLength in interface io.ebean.config.DbConstraintNaming.MaxLength