-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong migration created because of default column value format #5407
Labels
Comments
jeiea
added a commit
to jeiea/typeorm
that referenced
this issue
Oct 9, 2020
MySQL/MariaDB decimal column is represented like '0.0'. MysqlDriver.normalizeDefault didn't consider trailing zeros. User can bypass this by passing default as string, but we can't guide the zeros by type, so we should convert user input. Close typeorm#6140 Close typeorm#5407
jeiea
added a commit
to jeiea/typeorm
that referenced
this issue
Oct 9, 2020
MySQL/MariaDB decimal column is represented like '0.0'. MysqlDriver.normalizeDefault didn't consider trailing zeros. User can bypass this by passing default as string, but we can't guide the zeros by type, so we should convert user input. Close typeorm#6140 Close typeorm#5407
jeiea
added a commit
to jeiea/typeorm
that referenced
this issue
Oct 10, 2020
MySQL/MariaDB decimal column is represented like '0.0'. MysqlDriver.normalizeDefault didn't consider trailing zeros. User can bypass this by passing default as string, but we can't guide the zeros by type, so we should convert user input. undefined scale was compared with defined scale. Skip this comparison. Close typeorm#6140 Close typeorm#5407
jeiea
added a commit
to jeiea/typeorm
that referenced
this issue
Oct 10, 2020
MySQL/MariaDB decimal column is represented like '0.0'. MysqlDriver.normalizeDefault didn't consider trailing zeros. User can bypass this by passing default as string, but we can't guide the zeros by type, so we should convert user input. undefined scale was compared with defined scale. Skip this comparison. Close typeorm#6140 Close typeorm#5407
jeiea
added a commit
to jeiea/typeorm
that referenced
this issue
Oct 11, 2020
MySQL/MariaDB decimal column is represented like '0.0'. MysqlDriver.normalizeDefault didn't consider trailing zeros. User can bypass this by passing default as string, but we can't guide the zeros by type, so we should convert user input. undefined scale was compared with defined scale. Skip this comparison. Close typeorm#6140 Close typeorm#5407
jeiea
added a commit
to jeiea/typeorm
that referenced
this issue
Oct 11, 2020
MySQL/MariaDB decimal column is represented like '0.0'. MysqlDriver.normalizeDefault didn't consider trailing zeros. User can bypass this by passing default as string, but we can't guide the zeros by type, so we should convert user input. undefined scale was compared with defined scale. Skip this comparison. Close typeorm#6140 Close typeorm#5407
jeiea
added a commit
to jeiea/typeorm
that referenced
this issue
Oct 11, 2020
MySQL/MariaDB decimal column is represented like '0.0'. MysqlDriver.normalizeDefault didn't consider trailing zeros. User can bypass this by passing default as string, but we can't guide the zeros by type, so we should convert user input. undefined scale was compared with defined scale. Skip this comparison. Close typeorm#6140 Close typeorm#5407
jeiea
added a commit
to jeiea/typeorm
that referenced
this issue
Oct 11, 2020
MySQL/MariaDB decimal column is represented like '0.0'. MysqlDriver.normalizeDefault didn't consider trailing zeros. User can bypass this by passing default as string, but we can't guide the zeros by type, so we should convert user input. undefined scale was compared with defined scale. Skip this comparison. Close typeorm#6140 Close typeorm#5407
imnotjames
pushed a commit
that referenced
this issue
Oct 11, 2020
MySQL/MariaDB decimal column is represented like '0.0'. MysqlDriver.normalizeDefault didn't consider trailing zeros. User can bypass this by passing default as string, but we can't guide the zeros by type, so we should convert user input. undefined scale was compared with defined scale. Skip this comparison. Close #6140 Close #5407
zaro
pushed a commit
to zaro/typeorm
that referenced
this issue
Jan 12, 2021
MySQL/MariaDB decimal column is represented like '0.0'. MysqlDriver.normalizeDefault didn't consider trailing zeros. User can bypass this by passing default as string, but we can't guide the zeros by type, so we should convert user input. undefined scale was compared with defined scale. Skip this comparison. Close typeorm#6140 Close typeorm#5407
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue type:
[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[x]
mysql
/mariadb
[ ]
oracle
[ ]
postgres
[ ]
cockroachdb
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[ ]
latest
[ ]
@next
[x]
0.2.22
(or put your version here)Steps to reproduce or a small repository showing the problem:
I have the following entity
lat
andlon
ware wrongly defined asint
previously so I updated to decimalwhen I run migrate:generate I it creates a migration file that (amongst others) contains the following lines
after I run the migration and later generate a new one I always get the following
However, I did some tests and I found that if I define
lat
andlon
with default'0.00000000'
typeorm will report no changes (as it should)The text was updated successfully, but these errors were encountered: