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:
Weiko
2025-10-17 19:23:00 +02:00
committed by GitHub
parent 84e7fabaab
commit cceeb6ed4d
79 changed files with 734 additions and 271 deletions
@@ -23,6 +23,7 @@ export const getFlatIndexMetadataMock = (
name: 'defaultFlatIndexMetadataName',
updatedAt: createdAt,
workspaceId: faker.string.uuid(),
applicationId: faker.string.uuid(),
...overrides,
};
};
@@ -1,3 +1,4 @@
import { type FlatEntityFrom } from 'src/engine/metadata-modules/flat-entity/types/flat-entity.type';
import { type IndexFieldMetadataEntity } from 'src/engine/metadata-modules/index-metadata/index-field-metadata.entity';
import { type IndexMetadataEntity } from 'src/engine/metadata-modules/index-metadata/index-metadata.entity';
import { type ExtractRecordTypeOrmRelationProperties } from 'src/engine/workspace-manager/workspace-migration-v2/types/extract-record-typeorm-relation-properties.type';
@@ -9,6 +10,7 @@ export type IndexMetadataRelationProperties =
MetadataEntitiesRelationTarget
>;
// Can't use FlatEntityFrom here because IndexFieldMetadataEntity is not a SyncableEntity
export type FlatIndexFieldMetadata = Omit<
IndexFieldMetadataEntity,
ExtractRecordTypeOrmRelationProperties<
@@ -17,7 +19,7 @@ export type FlatIndexFieldMetadata = Omit<
>
>;
export type FlatIndexMetadata = Omit<
export type FlatIndexMetadata = FlatEntityFrom<
IndexMetadataEntity,
IndexMetadataRelationProperties
> & {