From 89b912ee7341ab85fbe6f8d83366d2759d0eebf6 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 9 Feb 2023 16:24:02 +0200 Subject: [PATCH] fix some foreign id fields and max-length --- .../Espo/Resources/metadata/entityAcl/Attachment.json | 3 +++ .../metadata/entityDefs/ActionHistoryRecord.json | 2 +- .../Resources/metadata/entityDefs/Attachment.json | 8 +++----- .../Resources/metadata/entityDefs/AuthLogRecord.json | 4 ++-- .../Espo/Resources/metadata/entityDefs/AuthToken.json | 11 +++-------- 5 files changed, 12 insertions(+), 16 deletions(-) diff --git a/application/Espo/Resources/metadata/entityAcl/Attachment.json b/application/Espo/Resources/metadata/entityAcl/Attachment.json index 7f84b02e9b..b966911ad1 100644 --- a/application/Espo/Resources/metadata/entityAcl/Attachment.json +++ b/application/Espo/Resources/metadata/entityAcl/Attachment.json @@ -3,6 +3,9 @@ "storage": { "readOnly": true }, + "source": { + "readOnly": true + }, "sourceId": { "readOnly": true } diff --git a/application/Espo/Resources/metadata/entityDefs/ActionHistoryRecord.json b/application/Espo/Resources/metadata/entityDefs/ActionHistoryRecord.json index 1dd02779e0..0db6f136cb 100644 --- a/application/Espo/Resources/metadata/entityDefs/ActionHistoryRecord.json +++ b/application/Espo/Resources/metadata/entityDefs/ActionHistoryRecord.json @@ -36,7 +36,7 @@ }, "ipAddress": { "type": "varchar", - "maxLength": "39" + "maxLength": 39 }, "authToken": { "type": "link" diff --git a/application/Espo/Resources/metadata/entityDefs/Attachment.json b/application/Espo/Resources/metadata/entityDefs/Attachment.json index 20c6899ac4..68542feb8e 100644 --- a/application/Espo/Resources/metadata/entityDefs/Attachment.json +++ b/application/Espo/Resources/metadata/entityDefs/Attachment.json @@ -25,12 +25,10 @@ "view": "views/attachment/fields/parent", "validatorClassName": "Espo\\Classes\\FieldValidators\\Attachment\\Related" }, - "sourceId": { - "type": "varchar", - "maxLength": 36, + "source": { + "type": "link", "readOnly": true, - "disabled": true, - "index": true + "disabled": true }, "field": { "type": "varchar", diff --git a/application/Espo/Resources/metadata/entityDefs/AuthLogRecord.json b/application/Espo/Resources/metadata/entityDefs/AuthLogRecord.json index e359817f09..23e2a13d6b 100644 --- a/application/Espo/Resources/metadata/entityDefs/AuthLogRecord.json +++ b/application/Espo/Resources/metadata/entityDefs/AuthLogRecord.json @@ -19,7 +19,7 @@ }, "ipAddress": { "type": "varchar", - "maxLength": "45", + "maxLength": 45, "readOnly": true }, "createdAt": { @@ -55,7 +55,7 @@ "requestMethod": { "type": "varchar", "readOnly": true, - "maxLength": "15" + "maxLength": 15 }, "authTokenIsActive": { "type": "foreign", diff --git a/application/Espo/Resources/metadata/entityDefs/AuthToken.json b/application/Espo/Resources/metadata/entityDefs/AuthToken.json index 3e667dae42..1f0e2ec9db 100644 --- a/application/Espo/Resources/metadata/entityDefs/AuthToken.json +++ b/application/Espo/Resources/metadata/entityDefs/AuthToken.json @@ -2,7 +2,7 @@ "fields": { "token": { "type": "varchar", - "maxLength": "36", + "maxLength": 36, "index": true, "readOnly": true }, @@ -14,12 +14,7 @@ }, "secret": { "type": "varchar", - "maxLength": "36", - "readOnly": true - }, - "userId": { - "type": "varchar", - "maxLength": "36", + "maxLength": 36, "readOnly": true }, "user": { @@ -32,7 +27,7 @@ }, "ipAddress": { "type": "varchar", - "maxLength": "45", + "maxLength": 45, "readOnly": true }, "isActive": {