fix(MySQL): wrong TIMESTAMP fields length

This commit is contained in:
Fabio Di Stasio 2021-02-27 18:30:34 +01:00
parent 45351faeae
commit 201fad9265
1 changed files with 3 additions and 0 deletions

View File

@ -49,6 +49,9 @@ export class MySQLClient extends AntaresCore {
if (['DATE', 'TIME', 'YEAR', 'DATETIME'].includes(name)) if (['DATE', 'TIME', 'YEAR', 'DATETIME'].includes(name))
length = field.decimals; length = field.decimals;
if (name === 'TIMESTAMP')
length = 0;
if (name === 'CHAR' && field.charsetNr === 63)// if binary if (name === 'CHAR' && field.charsetNr === 63)// if binary
name = 'BINARY'; name = 'BINARY';