Merge branch 'master' of github.com:Kononnable/typeorm-model-generator

This commit is contained in:
Kononnable 2019-04-01 14:11:58 +02:00
commit dcffa51c6c
3 changed files with 14 additions and 1 deletions

View File

@ -73,6 +73,14 @@ export class MysqlDriver extends AbstractDriver {
case "int":
colInfo.tsType = "number";
break;
case "bit":
if (resp.COLUMN_TYPE === "bit(1)") {
colInfo.options.width = 1;
colInfo.tsType = "boolean";
} else {
colInfo.tsType = "number";
}
break;
case "tinyint":
if (resp.COLUMN_TYPE === "tinyint(1)") {
colInfo.options.width = 1;

View File

@ -9,6 +9,9 @@ export class Post {
@Column()
name: string;
@Column("bit")
bit: boolean;
@Column("int")
int: number;

View File

@ -9,6 +9,9 @@ export class Post {
@Column()
name: string;
@Column("bit")
bit: boolean;
@Column("int")
int: number;
@ -113,5 +116,4 @@ export class Post {
@Column("geometrycollection")
geometrycollection: string;
}