fix merge

This commit is contained in:
Brainslug
2025-09-18 17:44:45 +02:00
parent 390e359f1e
commit 2931d39282
3 changed files with 10 additions and 16 deletions

View File

@@ -1,6 +1,7 @@
import type {
ActionEventParams,
Field,RawField
Field,
RawField,
MutationOptions,
Relation,
SchemaOverview,

View File

@@ -1,12 +1,4 @@
import type {
Field,
Relation,
ApiCollection,
SchemaOverview,
Snapshot,
SnapshotField,
SnapshotRelation,
} from '@directus/types';
import type { Field, Relation, SchemaOverview, Snapshot } from '@directus/types';
import { version } from 'directus/version';
import type { Knex } from 'knex';
import { fromPairs, isArray, isPlainObject, mapValues, omit, sortBy, toPairs } from 'lodash-es';
@@ -31,7 +23,7 @@ export async function getSnapshot(options?: { database?: Knex; schema?: SchemaOv
fieldsService.readAll(),
relationsService.readAll(),
]);
const collectionsFiltered = collectionsRaw.filter((item) => excludeSystem(item) && excludeUntracked(item));
const fieldsFiltered = fieldsRaw.filter((item) => excludeSystem(item) && excludeUntracked(item));
const relationsFiltered = relationsRaw.filter((item) => excludeSystem(item) && excludeUntracked(item));
@@ -75,7 +67,7 @@ function systemFieldWithIndex(item: {
}) {
return item.meta?.system === true && item.schema?.is_indexed;
}
function excludeUntracked(item: { meta: unknown | null } | null) {
if (item?.meta === null) return false;
return true;

View File

@@ -1,13 +1,14 @@
import type { Column } from '@directus/schema';
import type { Field, Relation } from '@directus/types';
import { pick } from 'lodash-es';
import type {
Collection,
Field,
Relation,
SnapshotCollection,
SnapshotField,
SnapshotRelation,
SnapshotSystemField,
} from '../types/index.js';
} from '@directus/types';
import { pick } from 'lodash-es';
import type { Collection } from '../types/index.js';
/**
* Pick certain database vendor specific collection properties that should be compared when performing diff