@saltcorn/postgres 0.8.3-beta.2 → 0.8.4

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 +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saltcorn/postgres",
3
- "version": "0.8.3-beta.2",
3
+ "version": "0.8.4",
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": "0.8.3-beta.2",
15
+ "@saltcorn/db-common": "0.8.4",
16
16
  "pg": "^8.2.1",
17
17
  "pg-copy-streams": "^5.1.1"
18
18
  },
package/postgres.js CHANGED
@@ -368,9 +368,9 @@ const copyFrom1 = (fileStream, tableName, fieldNames, client) => {
368
368
  const copyFrom = async (fileStream, tableName, fieldNames, client) => {
369
369
  // TBD describe difference between CopyFrom and CopyFrom1
370
370
  const quote = (s) => `"${s}"`;
371
- const sql = `COPY "${sqlsanitize(tableName)}" (${fieldNames
372
- .map(quote)
373
- .join(",")}) FROM STDIN CSV HEADER`;
371
+ const sql = `COPY "${getTenantSchema()}"."${sqlsanitize(
372
+ tableName
373
+ )}" (${fieldNames.map(quote).join(",")}) FROM STDIN CSV HEADER`;
374
374
  sql_log(sql);
375
375
 
376
376
  const stream = client.query(copyStreams.from(sql));