title: Postgres enum in TypeORM
body: <p>In TypeORM, how can I create a postgres enum type <em>Gender</em> as in this raw query</p>
  <pre><code>CREATE TYPE public.Gender AS ENUM (
      'male', 'female'
  );
  ALTER TABLE public.person ALTER COLUMN gender TYPE public.gender USING gender::gender;
  </code></pre>
  <p>and use it in the Entity class?</p>
  <p>I have tried</p>
  <pre><code>@Entity()
  export class Person {
      @Column('enum')
      gender: 'male' | 'female'
  }
  </code></pre>
  <p>but obviously this isn't the right way, since I got the error message &quot;type <em>enum</em> does not exist&quot;.</p>
  <p>I don't want to use typescript enum either, since it will give me a bunch of 0s and 1s in the database.</p>