-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Description
Issue type:
[X] question
[ ] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[X] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[ ] latest
[X] @next
[ ] 0.x.x (or put your version here)
Steps to reproduce or a small repository showing the problem:
Is there a way to consolidate a shared enum like:
GenderEnum.ts
export enum Gender {
male = 'male',
female = 'female'
}
Used by 2 or more classes like Human.ts / Animal.ts in the database? Currently typeorm creates both human_gender_enum and animal_gender_enum even thought both are the same, so it's redundant to have different enums in the database.
If I create the enum type and tables directly in postgres this doesn't happen (only 1 enum is generated)