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
}