mirror of
https://github.com/colanode/colanode.git
synced 2025-12-29 00:25:03 +01:00
Fix in field update mutations queries
This commit is contained in:
@@ -49,7 +49,7 @@ export const TableViewBooleanCell = ({
|
||||
} else {
|
||||
const query = sql`
|
||||
UPDATE nodes
|
||||
SET attrs = json_remove(attrs, '$.${field.id}'),
|
||||
SET attrs = json_remove(attrs, '$.${sql.ref(field.id)}'),
|
||||
updated_at = ${new Date().toISOString()},
|
||||
updated_by = ${workspace.userId},
|
||||
version_id = ${NeuronId.generate(NeuronId.Type.Version)}
|
||||
|
||||
@@ -49,7 +49,7 @@ export const TableViewEmailCell = ({
|
||||
} else {
|
||||
const query = sql`
|
||||
UPDATE nodes
|
||||
SET attrs = json_remove(attrs, '$.${field.id}'),
|
||||
SET attrs = json_remove(attrs, '$.${sql.ref(field.id)}'),
|
||||
updated_at = ${new Date().toISOString()},
|
||||
updated_by = ${workspace.userId},
|
||||
version_id = ${NeuronId.generate(NeuronId.Type.Version)}
|
||||
|
||||
@@ -54,7 +54,7 @@ export const TableViewNumberCell = ({
|
||||
} else {
|
||||
const query = sql`
|
||||
UPDATE nodes
|
||||
SET attrs = json_remove(attrs, '$.${field.id}'),
|
||||
SET attrs = json_remove(attrs, '$.${sql.ref(field.id)}'),
|
||||
updated_at = ${new Date().toISOString()},
|
||||
updated_by = ${workspace.userId},
|
||||
version_id = ${NeuronId.generate(NeuronId.Type.Version)}
|
||||
|
||||
@@ -57,7 +57,7 @@ export const TableViewSelectCell = ({
|
||||
} else {
|
||||
const query = sql`
|
||||
UPDATE nodes
|
||||
SET attrs = json_remove(attrs, '$.${field.id}'),
|
||||
SET attrs = json_remove(attrs, '$.${sql.ref(field.id)}'),
|
||||
updated_at = ${new Date().toISOString()},
|
||||
updated_by = ${workspace.userId},
|
||||
version_id = ${NeuronId.generate(NeuronId.Type.Version)}
|
||||
|
||||
@@ -49,7 +49,7 @@ export const TableViewTextCell = ({
|
||||
} else {
|
||||
const query = sql`
|
||||
UPDATE nodes
|
||||
SET attrs = json_remove(attrs, '$.${field.id}'),
|
||||
SET attrs = json_remove(attrs, '$.${sql.ref(field.id)}'),
|
||||
updated_at = ${new Date().toISOString()},
|
||||
updated_by = ${workspace.userId},
|
||||
version_id = ${NeuronId.generate(NeuronId.Type.Version)}
|
||||
|
||||
Reference in New Issue
Block a user