Skip to content
This repository was archived by the owner on Aug 17, 2022. It is now read-only.

Commit 751aa0d

Browse files
committed
support to precision and scale in NUMBER types
1 parent 4766392 commit 751aa0d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/migrate.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ const reverseSequelizeColType = function(col, prefix = 'Sequelize.')
6060
ret += ', ' + options.decimals;
6161
ret += ')';
6262
}
63+
64+
65+
if (options.precision) {
66+
ret += '('+options.precision;
67+
if (options.scale)
68+
ret += ', ' + options.scale;
69+
ret += ')';
70+
}
71+
6372

6473
ret = [ ret ];
6574

0 commit comments

Comments
 (0)