Describe the bug
When defining and using an enum in Entity like this one :
@Entity({ tableName: 'foo' })
export class Foo {
@PrimaryKey()
public id: number;
@Enum({ items: () => FooTypes })
public type: FooTypes;
}
If i update (add a value, change a value, or even delete one) in my enum that is like this :
export enum FooTypes {
A = 'A',
B = 'B',
C = 'C'
}
Nothing is taken into account. Whether i use schema:update, schema:fresh or even create a migration with migration:create, my changes are not detected.
The only thing that worked, was change the column type, like make it a VARCHAR and reverted it back to the initial Enum it was, and it sucessfully updated.
To Reproduce
I created a repository so that you can better understand the issue, unfortunately i would like to keep a mysql database since it may come from here as well. So you would need to input a real database in the repro unfortunately.
Expected behavior
Enum values should be updated in the database properly
Versions
| Dependency |
Version |
| node |
16.13.0 |
| typescript |
4.8.4 |
| mikro-orm |
5.6.2 |
| mikro-orm/mysql |
5.6.2 |
| nest-js |
9.2.1 |
Describe the bug
When defining and using an enum in Entity like this one :
If i update (add a value, change a value, or even delete one) in my enum that is like this :
Nothing is taken into account. Whether i use schema:update, schema:fresh or even create a migration with migration:create, my changes are not detected.
The only thing that worked, was change the column type, like make it a VARCHAR and reverted it back to the initial Enum it was, and it sucessfully updated.
To Reproduce
I created a repository so that you can better understand the issue, unfortunately i would like to keep a mysql database since it may come from here as well. So you would need to input a real database in the repro unfortunately.
Expected behavior
Enum values should be updated in the database properly
Versions