@cadenza.io/service 1.6.10 → 1.6.11
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 +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2473,7 +2473,9 @@ CREATE TRIGGER prevent_modification BEFORE UPDATE OR DELETE ON ${tableName} FOR
|
|
|
2473
2473
|
if (table.initialData) {
|
|
2474
2474
|
ddl.push(
|
|
2475
2475
|
`INSERT INTO ${tableName} (${table.initialData.fields.join(", ")}) VALUES ${table.initialData.data.map(
|
|
2476
|
-
(row) => `(
|
|
2476
|
+
(row) => `(${row.map(
|
|
2477
|
+
(value) => value === void 0 ? "NULL" : value.charAt(0) === "'" ? value : `'${value}'`
|
|
2478
|
+
).join(", ")})`
|
|
2477
2479
|
// TODO: handle non string data
|
|
2478
2480
|
).join(", ")} ON CONFLICT DO NOTHING;`
|
|
2479
2481
|
);
|