title: Is there any way if we can create Enum in Postgres DB using JPA?
body: <p>I'm following link: <a href="https://vladmihalcea.com/the-best-way-to-map-an-enum-type-with-jpa-and-hibernate/" rel="nofollow noreferrer">https://vladmihalcea.com/the-best-way-to-map-an-enum-type-with-jpa-and-hibernate/</a>. Is there any way if we can create Enum in Postgres DB using JPA?</p>
  
  <pre><code>CREATE TYPE MyStatus AS ENUM (
      'PENDING',
      'APPROVED',
      'SPAM'
  )
  </code></pre>
  
  <p>I really don't want to keep it manual execution. Any way of doing this? </p>
  
  <p>I'm looking out the way to create everything using FlyWay. There are certain reasons for that. Do you know if creation of Enum using JPA possible ? I think this feature should be available as JPA gives almost everything</p>
  
  <p>I used below in my model class, but still it doesn't works well.</p>
  
  <pre><code>@Column(name = "status", length = 1, columnDefinition = "MyStatus")
  @Enumerated(EnumType.STRING)
  @MapKeyEnumerated
  @Type( type = "pgsql_enum" )
  private StatusEnum status;
  </code></pre>