[FIXES_MAIN] Remove objectMetadata standardId (#17632)
# Introduction In this PR we're deprecating the object metadata standard id and replacing it to the universalIdentifier usage As we've totally removed its insertion for both new field and object in https://github.com/twentyhq/twenty/pull/17572 ## Note - Removed upgrade commands before `1.17`
This commit is contained in:
-1
@@ -35,7 +35,6 @@ describe('getColumnNameToFieldMetadataIdMap', () => {
|
||||
description: null,
|
||||
standardOverrides: null,
|
||||
isUIReadOnly: false,
|
||||
standardId: null,
|
||||
labelIdentifierFieldMetadataId: null,
|
||||
imageIdentifierFieldMetadataId: null,
|
||||
duplicateCriteria: null,
|
||||
|
||||
-1
@@ -35,7 +35,6 @@ describe('getFieldMetadataIdToColumnNamesMap', () => {
|
||||
description: null,
|
||||
standardOverrides: null,
|
||||
isUIReadOnly: false,
|
||||
standardId: null,
|
||||
labelIdentifierFieldMetadataId: null,
|
||||
imageIdentifierFieldMetadataId: null,
|
||||
duplicateCriteria: null,
|
||||
|
||||
-1
@@ -35,7 +35,6 @@ describe('isRecordMatchingRLSRowLevelPermissionPredicate', () => {
|
||||
description: null,
|
||||
standardOverrides: null,
|
||||
isUIReadOnly: false,
|
||||
standardId: null,
|
||||
labelIdentifierFieldMetadataId: null,
|
||||
imageIdentifierFieldMetadataId: null,
|
||||
duplicateCriteria: null,
|
||||
|
||||
+5
-2
@@ -7,7 +7,6 @@ import {
|
||||
ObjectRecordUpsertEvent,
|
||||
type ObjectRecordDiff,
|
||||
} from 'twenty-shared/database-events';
|
||||
import { STANDARD_OBJECT_IDS } from 'twenty-shared/metadata';
|
||||
import {
|
||||
assertUnreachable,
|
||||
isDefined,
|
||||
@@ -27,6 +26,7 @@ import {
|
||||
TwentyORMExceptionCode,
|
||||
} from 'src/engine/twenty-orm/exceptions/twenty-orm.exception';
|
||||
import { type DatabaseBatchEventInput } from 'src/engine/workspace-event-emitter/workspace-event-emitter';
|
||||
import { STANDARD_OBJECTS } from 'src/engine/workspace-manager/twenty-standard-application/constants/standard-object.constant';
|
||||
|
||||
export const formatTwentyOrmEventToDatabaseBatchEvent = <
|
||||
T extends ObjectLiteral,
|
||||
@@ -47,7 +47,10 @@ export const formatTwentyOrmEventToDatabaseBatchEvent = <
|
||||
recordsAfter?: T[];
|
||||
recordsBefore?: T[];
|
||||
}): DatabaseBatchEventInput<T, DatabaseEventAction> | undefined => {
|
||||
if (objectMetadataItem.standardId === STANDARD_OBJECT_IDS.timelineActivity) {
|
||||
if (
|
||||
objectMetadataItem.universalIdentifier ===
|
||||
STANDARD_OBJECTS.timelineActivity.universalIdentifier
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user