From b81b54f57f26919e2f5e53a0fa37b5e70eb7b1c2 Mon Sep 17 00:00:00 2001 From: Kononnable Date: Fri, 9 Aug 2019 19:40:01 +0200 Subject: [PATCH] set precision when scale isn't default numeric types fixes #184 --- src/Engine.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Engine.ts b/src/Engine.ts index bf4efe6..6416068 100644 --- a/src/Engine.ts +++ b/src/Engine.ts @@ -106,15 +106,12 @@ function removeColumnDefaultProperties( if ( column.options.precision && defVal.precision && - column.options.precision === defVal.precision - ) { - column.options.precision = undefined; - } - if ( + column.options.precision === defVal.precision && column.options.scale && defVal.scale && column.options.scale === defVal.scale ) { + column.options.precision = undefined; column.options.scale = undefined; } if (