-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Description
Issue type:
[X] 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:
[X] latest
[ ] @next
[ ] 0.x.x (or put your version here)
Steps to reproduce or a small repository showing the problem:
Using an enum value
enum UsageType {
FRAMES = 'frames',
REPORT_GAIT = 'reports.gait',
REPORT_RULA = 'reports.rula',
REPORT_ACL = 'reports.acl',
}
@Column({
type: 'enum',
enum: UsageType,
enumName: 'billing_usage_type_enum',
default: UsageType.REPORT_GAIT,
})
usage_type: UsageType;In combination with a defined postgres schema results in the enum type being created in the default schema (using the typeorm migrations generator).
await queryRunner.query(`CREATE TYPE "billing_usage_type_enum" AS ENUM('frames', 'reports.gait', 'reports.rula', 'reports.acl')`);Instead of
await queryRunner.query(`CREATE TYPE "app_schema"."billing_usage_type_enum" AS ENUM('frames', 'reports.gait', 'reports.rula', 'reports.acl')`);The referring columns also point to the default schema.
Reactions are currently unavailable