title: Grails limit database column size
body: <p>In my Grails app I have a domain class that has a property</p>
  
  <pre><code>SearchPrivacy searchPrivacy = SearchPrivacy.PUBLIC
  </code></pre>
  
  <p>where SearchPrivacy is an enum</p>
  
  <pre><code>enum SearchPrivacy {
      PRIVATE('pr'), PUBLIC('pu');
  
      final String id
  
      SearchPrivacy(String id) {
          this.id = id
      }
  
      static getEnumFromId(String id) {
          values().find {it.id == id}
      }
  }
  </code></pre>
  
  <p>according to the Grails docs, the mapped database column will store either <code>pr</code> or <code>pu</code> - the value of the <code>id</code> property. However, there doesn't seem to be a way to reduce the max length of the DB column. I've tried adding both of the following</p>
  
  <pre><code>static constrtaints = {
      searchPrivacy(size: 2..2, maxSize: 2)
  }
  </code></pre>
  
  <p>But in the generated schema the column is still <code>varchar(255)</code></p>
  
  <p>Thanks,
  Don</p>