@axiosleo/orm-mysql 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/orm-mysql.js +1 -1
- package/package.json +1 -1
- package/src/builder.js +2 -2
package/bin/orm-mysql.js
CHANGED
package/package.json
CHANGED
package/src/builder.js
CHANGED
|
@@ -710,7 +710,7 @@ class ManageSQLBuilder extends Builder {
|
|
|
710
710
|
let str = `\`${options.name}\` ${type}`;
|
|
711
711
|
if (typeof options.length !== 'undefined') {
|
|
712
712
|
if (type === 'DECIMAL') {
|
|
713
|
-
str += `(${options.
|
|
713
|
+
str += `(${options.precision || 10}, ${options.length || 6})`;
|
|
714
714
|
} else {
|
|
715
715
|
str += `(${options.length})`;
|
|
716
716
|
}
|
|
@@ -721,7 +721,7 @@ class ManageSQLBuilder extends Builder {
|
|
|
721
721
|
} else if (type === 'TINYINT') {
|
|
722
722
|
str += '(4)';
|
|
723
723
|
} else if (type === 'DECIMAL') {
|
|
724
|
-
str +=
|
|
724
|
+
str += `(${options.precision || 10}, ${options.length || 6})`;
|
|
725
725
|
}
|
|
726
726
|
if (options.allowNull === false || options.primaryKey === true) {
|
|
727
727
|
str += ' NOT NULL';
|