title: sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) ENUM type
body: <p>I am using postgres and sqlalchemy to setup a reservation table that holds information on specific job applications. When a user applies for a job, the default status of the application is 'pending.' Once the reservation is accepted, the status of the application changes. I'm implementing an enum type to switch between states. I'm receiving an error that says this ENUM type is not being handled properly with postgres. I'm in the process of switching my DB from SQLite to postgres so this many be a postgres syntax difference. Thank you in advance :~)</p>
  
  <p>[SQL: "CREATE TYPE reservation_status_enum AS ENUM ('pending', 'confirmed', 'rejected')"]</p>
  
  <p>Here is my model:</p>
  
  <pre><code>class Reservation(db.Model):
  __tablename__ = "reservations"
  
  id = db.Column(db.Integer, autoincrement=True, primary_key=True)
  message = db.Column(db.String, nullable=False)
  status = db.Column(db.Enum('pending', 'confirmed', 'rejected', name='reservation_status_enum'), default='pending')
  anonymous_phone_number = db.Column(db.String, nullable=True)
  guest_id = db.Column(db.Integer, db.ForeignKey('users.id'))
  job_task_id = db.Column(db.Integer, db.ForeignKey('job_listings.id'))
  guest = db.relationship("User", back_populates="reservations")
  job_task = db.relationship("JobTask", back_populates="reservations")
  
  def __init__(self, message, job_task, guest):
      self.message = message
      self.guest = guest
      self.job_task = job_task
      self.status = 'pending'
  </code></pre>
  
  <p>Here is my sqlalchemy setup:</p>
  
  <pre><code>op.create_table('reservations',
                  sa.Column('id', sa.Integer(), nullable=False),
                  sa.Column('message', sa.String(), nullable=False),
                  sa.Column('status', sa.Enum('pending', 'confirmed', 'rejected', name='reservation_status_enum'),
                            nullable=True),
                  sa.Column('anonymous_phone_number', sa.String(), nullable=True),
                  sa.Column('guest_id', sa.Integer(), nullable=True),
                  sa.Column('job_task_id', sa.Integer(), nullable=True),
                  sa.ForeignKeyConstraint(['guest_id'], ['users.id'], ),
                  sa.ForeignKeyConstraint(['job_task_id'], ['job_listings.id'], ),
                  sa.PrimaryKeyConstraint('id')
                  )
  </code></pre>
  
  <p>Here is my stacktrace:</p>
  
  <pre><code> File         "/Users/shai/Development/Python/mask_num/gigaware/venv/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
  cursor.execute(statement, parameters)
  sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) type "reservation_status_enum" already exists [SQL: "CREATE TYPE reservation_status_enum AS ENUM ('pending', 'confirmed', 'rejected')"]
  </code></pre>