code: private static String getSqlColumnConstraints(
        EntityType entityType, Attribute attr, ColumnMode columnConstraintsMode) {
      StringBuilder sqlBuilder = new StringBuilder();
      if (!attr.getName().equals(entityType.getIdAttribute().getName()) && !attr.isNillable()) {
        sqlBuilder.append("NOT NULL");
      }
      if (columnConstraintsMode == INCLUDE_DEFAULT_CONSTRAINT
          && generateSqlColumnDefaultConstraint(attr)) {
        if (sqlBuilder.length() > 0) {
          sqlBuilder.append(' ');
        }
        sqlBuilder.append("DEFAULT ").append(getSqlDefaulValue(attr));
      }
      return sqlBuilder.toString();
    }
docs: Generates column constraint SQL, e.g. 'NOT NULL DEFAULT 123'
  
  @param entityType entity type
  @param attr attribute
  @param columnConstraintsMode whether or not to add default constraint to generated SQL
  @return column constraint SQL