drizzle-kit 0.14.0 → 0.14.1
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/index.js +10 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -7402,6 +7402,7 @@ var init_pgSerializer = __esm({
|
|
|
7402
7402
|
(0, import_utils.getTableColumns)(table4).forEach((column4) => {
|
|
7403
7403
|
const notNull = column4.notNull;
|
|
7404
7404
|
const primaryKey = column4.primary;
|
|
7405
|
+
const sqlTypeLowered = column4.getSQLType().toLowerCase();
|
|
7405
7406
|
const columnToSet = {
|
|
7406
7407
|
name: column4.name,
|
|
7407
7408
|
type: column4.getSQLType(),
|
|
@@ -7417,7 +7418,15 @@ var init_pgSerializer = __esm({
|
|
|
7417
7418
|
throw new Error("Only strings are allowed in .default()");
|
|
7418
7419
|
}).join();
|
|
7419
7420
|
} else {
|
|
7420
|
-
|
|
7421
|
+
if (typeof column4.default === "string") {
|
|
7422
|
+
columnToSet.default = `'${column4.default}'`;
|
|
7423
|
+
} else {
|
|
7424
|
+
if (sqlTypeLowered === "jsonb" || sqlTypeLowered === "json") {
|
|
7425
|
+
columnToSet.default = `'${JSON.stringify(column4.default)}'::${sqlTypeLowered}`;
|
|
7426
|
+
} else {
|
|
7427
|
+
columnToSet.default = column4.default;
|
|
7428
|
+
}
|
|
7429
|
+
}
|
|
7421
7430
|
}
|
|
7422
7431
|
}
|
|
7423
7432
|
columnsObject[column4.name] = columnToSet;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drizzle-kit",
|
|
3
|
-
"version": "0.14.
|
|
4
|
-
"repository": "https://github.com/
|
|
3
|
+
"version": "0.14.1",
|
|
4
|
+
"repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
|
|
5
5
|
"author": "Alex Blokh <aleksandrblokh@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|