rake-db 2.29.6 → 2.29.8
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -408,7 +408,7 @@ const columnToSql = (config, name, item, values, hasMultiplePrimaryKeys, snakeCa
|
|
|
408
408
|
const encodeColumnDefault = (def, values, column) => {
|
|
409
409
|
if (def !== void 0 && def !== null && typeof def !== "function") {
|
|
410
410
|
if (pqb.isRawSQL(def)) {
|
|
411
|
-
return def.toSQL({ values })
|
|
411
|
+
return `(${def.toSQL({ values })})`;
|
|
412
412
|
} else {
|
|
413
413
|
return pqb.escapeForMigration(
|
|
414
414
|
column instanceof pqb.ArrayColumn && Array.isArray(def) ? "{" + (column.data.item.data.encode ? def.map((x) => column.data.item.data.encode(x)) : def).join(",") + "}" : column?.data.encode ? column.data.encode(def) : def
|