rado 0.1.20 → 0.1.22
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/dist/lib/Formatter.js +2 -2
- package/package.json +1 -2
package/dist/lib/Formatter.js
CHANGED
|
@@ -170,7 +170,7 @@ var Formatter = class {
|
|
|
170
170
|
column.defaultValue,
|
|
171
171
|
() => raw("DEFAULT").addParenthesis(
|
|
172
172
|
this.formatExpr(column.defaultValue, {
|
|
173
|
-
formatAsJson:
|
|
173
|
+
formatAsJson: true,
|
|
174
174
|
forceInline: true
|
|
175
175
|
})
|
|
176
176
|
)
|
|
@@ -213,7 +213,7 @@ var Formatter = class {
|
|
|
213
213
|
const isOptional = column.nullable || column.autoIncrement || column.primaryKey;
|
|
214
214
|
if (isNull) {
|
|
215
215
|
if (column.defaultValue !== void 0)
|
|
216
|
-
return this.formatExpr(column.defaultValue, {});
|
|
216
|
+
return this.formatExpr(column.defaultValue, { formatAsJson: true });
|
|
217
217
|
if (!isOptional)
|
|
218
218
|
throw new TypeError(`Expected value for column ${column.name}`);
|
|
219
219
|
return raw("NULL");
|
package/package.json
CHANGED