You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the .money_len type in the creation of a column on a table i get a sql error:
Execution Error: error returned from database: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'money(7, 2) NOT NULL )
Looking further into mysql data types, i dont think a MONEY type even exists? maybe that is a postgres specific feature. Additionally, I am not sure that money_len would make much sense in the context of postgres either, as it would be identical to decimal_len.
Steps to Reproduce
Create a migration for a new table
Add a column with type .money_len
Run it programmatically using Migrator::up(&db, None).await
Expected Behavior
It should create a column that can store prices up to 99999.99
Actual Behavior
It breaks with an error indicating bad sql syntax: Execution Error: error returned from database: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'money(7, 2) NOT NULL )
Reproduces How Often
Always
Workarounds
I have been using decimal_len instead which seems to work fine.
Description
When using the
.money_len
type in the creation of a column on a table i get a sql error:Execution Error: error returned from database: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'money(7, 2) NOT NULL )
Looking further into mysql data types, i dont think a MONEY type even exists? maybe that is a postgres specific feature. Additionally, I am not sure that money_len would make much sense in the context of postgres either, as it would be identical to decimal_len.
Steps to Reproduce
Migrator::up(&db, None).await
Expected Behavior
It should create a column that can store prices up to
99999.99
Actual Behavior
It breaks with an error indicating bad sql syntax:
Execution Error: error returned from database: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'money(7, 2) NOT NULL )
Reproduces How Often
Always
Workarounds
I have been using
decimal_len
instead which seems to work fine.Reproducible Example
Versions
sea-orm version 0.12, mysql version 8.0
The text was updated successfully, but these errors were encountered: