-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Description
Currently SQLite doesn't have ENUM type, but TypeORM can use it's own validator before inserting a value into the DB and emit an error when the value is not in the enum.
enum MyEnum {
zero = 0;
one = 1;
}
@Entity()
export class Test {
@Column({enum: MyEnum})
myVar: number; // Must be 0 or 1
}mhombach, atheros, leoperria, Taraflex, ludwiktrammer and 25 more