@saltcorn/postgres 1.3.0-beta.10 → 1.3.0-beta.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/postgres.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saltcorn/postgres",
3
- "version": "1.3.0-beta.10",
3
+ "version": "1.3.0-beta.11",
4
4
  "description": "Postgres structures for Saltcorn, open-source no-code platform",
5
5
  "homepage": "https://saltcorn.com",
6
6
  "scripts": {
@@ -12,7 +12,7 @@
12
12
  "license": "MIT",
13
13
  "main": "index.js",
14
14
  "dependencies": {
15
- "@saltcorn/db-common": "1.3.0-beta.10",
15
+ "@saltcorn/db-common": "1.3.0-beta.11",
16
16
  "pg": "^8.13.1",
17
17
  "pg-copy-streams": "^6.0.6",
18
18
  "replacestream": "4.0.3"
package/postgres.js CHANGED
@@ -234,7 +234,7 @@ const insert = async (tbl, obj, opts = Object.create(null)) => {
234
234
  valPosList.push(
235
235
  `coalesce((select max(_version) from "${schema}"."${sqlsanitize(
236
236
  tbl
237
- )}" where id=$${valList.length}), 0)+1`
237
+ )}" where "${v.pk_name || "id"}"=$${valList.length}), 0)+1`
238
238
  );
239
239
  } else {
240
240
  valList.push(v);