Browse Source

fix: include schema name in multiselect option update query

pull/6864/head
Pranav C 1 year ago
parent
commit
3b4bddad5c
  1. 6
      packages/nocodb/src/services/columns.service.ts

6
packages/nocodb/src/services/columns.service.ts

@ -757,10 +757,11 @@ export class ColumnsService {
);
}
} else if (driverType === 'pg') {
const schema = source.getConfig()?.schema;
await dbDriver.raw(
`UPDATE ?? SET ?? = array_to_string(array_replace(string_to_array(??, ','), ?, ?), ',')`,
[
table.table_name,
schema ? `${schema}.${table.table_name}` : table.table_name,
column.column_name,
column.column_name,
option.title,
@ -845,10 +846,11 @@ export class ColumnsService {
);
}
} else if (driverType === 'pg') {
const schema = source.getConfig()?.schema;
await dbDriver.raw(
`UPDATE ?? SET ?? = array_to_string(array_replace(string_to_array(??, ','), ?, ?), ',')`,
[
table.table_name,
schema ? `${schema}.${table.table_name}` : table.table_name,
column.column_name,
column.column_name,
ch.temp_title,

Loading…
Cancel
Save