go-gorm / datatypes

GORM Customized Data Types Collection
https://gorm.io/docs/data_types.html
MIT License
714 stars 108 forks source link

Add Enum type support for Postgres #236

Open amaschas opened 10 months ago

amaschas commented 10 months ago

Describe the feature

An enum type that with automigration support in MySQL and Postgres.

Motivation

At one point in time, GORM supported enum types that worked with automigrate in Postgres, but since V2 that support appears to have been deprecated. Given that there is still a ton of documentation around that indicates that GORM supports enum types for Postgres, but all of it documents an approach that no longer works in V2, it seems like that is something that would appropriately handled here.

Related Issues