mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(NocoDB Node): Fix for updating or deleting rows with not default primary keys
This commit is contained in:
@@ -65,22 +65,65 @@ export const operationFields: INodeProperties[] = [
|
||||
required: true,
|
||||
description: 'The name of the table',
|
||||
},
|
||||
{
|
||||
displayName: 'Primary Key Type',
|
||||
name: 'primaryKey',
|
||||
type: 'options',
|
||||
default: 'id',
|
||||
options: [
|
||||
{
|
||||
name: 'Default',
|
||||
value: 'id',
|
||||
description:
|
||||
'Default, added when table was created from UI by those options: Create new table / Import from Excel / Import from CSV',
|
||||
},
|
||||
{
|
||||
name: 'Imported From Airtable',
|
||||
value: 'ncRecordId',
|
||||
description: 'Select if table was imported from Airtable',
|
||||
},
|
||||
{
|
||||
name: 'Custom',
|
||||
value: 'custom',
|
||||
description:
|
||||
'When connecting to existing external database as existing primary key field is retained as is, enter the name of the primary key field below',
|
||||
},
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['delete', 'update'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Field Name',
|
||||
name: 'customPrimaryKey',
|
||||
type: 'string',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['delete', 'update'],
|
||||
primaryKey: ['custom'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Row ID Value',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
description: 'The value of the ID field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['delete', 'get', 'update'],
|
||||
},
|
||||
},
|
||||
},
|
||||
// ----------------------------------
|
||||
// delete
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Row ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
description: 'ID of the row to delete',
|
||||
},
|
||||
|
||||
// ----------------------------------
|
||||
// getAll
|
||||
// ----------------------------------
|
||||
@@ -222,19 +265,6 @@ export const operationFields: INodeProperties[] = [
|
||||
// ----------------------------------
|
||||
// get
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Row ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
description: 'ID of the row to return',
|
||||
},
|
||||
{
|
||||
displayName: 'Download Attachments',
|
||||
name: 'downloadAttachments',
|
||||
@@ -265,19 +295,6 @@ export const operationFields: INodeProperties[] = [
|
||||
// ----------------------------------
|
||||
// update
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Row ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
description: 'ID of the row to update',
|
||||
},
|
||||
// ----------------------------------
|
||||
// Shared
|
||||
// ----------------------------------
|
||||
|
||||
Reference in New Issue
Block a user