Added support for UNSIGNED columns in MySQL.
This commit is contained in:
parent
b70aba10c8
commit
2240cc3aeb
@ -72,6 +72,9 @@ export class MysqlDriver extends AbstractDriver {
|
||||
resp.COLUMN_DEFAULT
|
||||
);
|
||||
colInfo.options.type = resp.DATA_TYPE as any;
|
||||
colInfo.options.unsigned = resp.COLUMN_TYPE.endsWith(
|
||||
" unsigned"
|
||||
);
|
||||
switch (resp.DATA_TYPE) {
|
||||
case "int":
|
||||
colInfo.tsType = "number";
|
||||
|
@ -15,7 +15,8 @@ import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne
|
||||
primary:{{primary}},{{/primary}}{{/generated}}{{#unique}}
|
||||
unique: true,{{/unique}}{{#length}}
|
||||
length:{{.}},{{/length}}{{#width}}
|
||||
width:{{.}},{{/width}}{{#default}}
|
||||
width:{{.}},{{/width}}{{#unsigned}}
|
||||
unsigned: true,{{/unsigned}}{{#default}}
|
||||
default: {{.}},{{/default}}{{#precision}}
|
||||
precision:{{.}},{{/precision}}{{#scale}}
|
||||
scale:{{.}},{{/scale}}{{#enum}}
|
||||
|
Loading…
Reference in New Issue
Block a user