Merge branch 'master' of github.com:Kononnable/typeorm-model-generator
This commit is contained in:
commit
dcffa51c6c
@ -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;
|
||||
|
@ -9,6 +9,9 @@ export class Post {
|
||||
@Column()
|
||||
name: string;
|
||||
|
||||
@Column("bit")
|
||||
bit: boolean;
|
||||
|
||||
@Column("int")
|
||||
int: number;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user