@saltcorn/postgres 0.8.5-rc.2 → 0.8.6-beta.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/postgres.js +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saltcorn/postgres",
3
- "version": "0.8.5-rc.2",
3
+ "version": "0.8.6-beta.1",
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.5-rc.2",
15
+ "@saltcorn/db-common": "0.8.6-beta.1",
16
16
  "pg": "^8.2.1",
17
17
  "pg-copy-streams": "^5.1.1"
18
18
  },
package/postgres.js CHANGED
@@ -356,7 +356,7 @@ const add_index = async (table_name, field_name) => {
356
356
  */
357
357
  const drop_index = async (table_name, field_name) => {
358
358
  // TBD check that there are no problems with lenght of constraint name
359
- const sql = `drop index "${sqlsanitize(table_name)}_${sqlsanitize(
359
+ const sql = `drop index "${getTenantSchema()}"."${sqlsanitize(table_name)}_${sqlsanitize(
360
360
  field_name
361
361
  )}_index";`;
362
362
  sql_log(sql);
@@ -374,6 +374,10 @@ const drop_index = async (table_name, field_name) => {
374
374
  */
375
375
  const copyFrom1 = (fileStream, tableName, fieldNames, client) => {
376
376
  // TBD describe difference between CopyFrom and CopyFrom1
377
+ // 1. No tenant support
378
+ // 2. Manual promisification.
379
+ // 3. ???
380
+ // 4. Not exported nor used anywhere
377
381
  const quote = (s) => `"${s}"`;
378
382
  const sql = `COPY "${sqlsanitize(tableName)}" (${fieldNames
379
383
  .map(quote)