json-schema-table
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "json-schema-table", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Creates and maintains a SQL table structure", | ||
@@ -5,0 +5,0 @@ "homepage": "", |
@@ -499,2 +499,5 @@ /* eslint-disable max-len */ | ||
break; | ||
case 'boolean': | ||
column = 'BOOLEAN'; | ||
break; | ||
case 'blob': | ||
@@ -504,6 +507,10 @@ column = 'BYTEA'; | ||
case 'string': | ||
if (property.maxLength) { | ||
column = 'VARCHAR(' + property.maxLength + ')'; | ||
if (property.format === 'date-time') { | ||
column = 'TIMESTAMPTZ'; | ||
} else { | ||
column = 'TEXT'; | ||
if (property.maxLength) { | ||
column = 'VARCHAR(' + property.maxLength + ')'; | ||
} else { | ||
column = 'TEXT'; | ||
} | ||
} | ||
@@ -510,0 +517,0 @@ break; |
28008
688