Skip to content

Commit 23b5e53

Browse files
fix: exclude wrapping in quotes known multiword types (#177)
1 parent 17a18fc commit 23b5e53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

forward_engineering/ddlProvider/ddlHelpers/columnDefinitionHelper.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,13 @@ const canHaveTimePrecision = type => ['time', 'timestamp'].includes(type);
5959
const canHaveScale = type => type === 'numeric';
6060
const canHaveTypeModifier = type => ['geography', 'geometry'].includes(type);
6161

62+
const isKnownMultiwordsType = type => 'double precision' === type;
63+
6264
const decorateType = (type, columnDefinition) => {
6365
const { length, precision, scale, typeModifier, srid, timezone, timePrecision, dimension, subtype, array_type } =
6466
columnDefinition;
6567

66-
const safeType = wrapInQuotes(type);
68+
const safeType = isKnownMultiwordsType(type) ? type : wrapInQuotes(type);
6769

6870
if (canHaveLength(type) && _.isNumber(length)) {
6971
type = addLength(safeType, length);

0 commit comments

Comments
 (0)