Add applicationId to syncableEntity and fix syncApp deletion (#15170)
## Context - All flatEntity should extend SyncableEntity - SyncableEntity should now have applicationId and application relation - Fix syncApp deletion, should now properly use migration v2 to delete syncable entities
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { faker } from '@faker-js/faker';
|
||||
import { type FieldMetadataType } from 'twenty-shared/types';
|
||||
|
||||
import { type ApplicationEntity } from 'src/engine/core-modules/application/application.entity';
|
||||
import { type FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
|
||||
import { type IndexFieldMetadataEntity } from 'src/engine/metadata-modules/index-metadata/index-field-metadata.entity';
|
||||
import { type ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
|
||||
@@ -49,6 +50,9 @@ export const getMockFieldMetadataEntity = <
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
isActive: true,
|
||||
application: {} as ApplicationEntity,
|
||||
applicationId: faker.string.uuid(),
|
||||
universalIdentifier: faker.string.uuid(),
|
||||
...overrides,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { faker } from '@faker-js/faker';
|
||||
|
||||
import { type ApplicationEntity } from 'src/engine/core-modules/application/application.entity';
|
||||
import { type DataSourceEntity } from 'src/engine/metadata-modules/data-source/data-source.entity';
|
||||
import { type ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
|
||||
|
||||
@@ -41,8 +42,9 @@ export const getMockObjectMetadataEntity = (
|
||||
objectPermissions: [],
|
||||
shortcut: null,
|
||||
standardId: null,
|
||||
applicationId: null,
|
||||
application: null,
|
||||
universalIdentifier: faker.string.uuid(),
|
||||
applicationId: faker.string.uuid(),
|
||||
application: {} as ApplicationEntity,
|
||||
targetRelationFields: [],
|
||||
standardOverrides: null,
|
||||
targetTableName: faker.string.uuid(),
|
||||
|
||||
Reference in New Issue
Block a user