Cleanup deprecated metadata after migration

- delete deprecated metadata
- save applied migration id per metadata holder
This commit is contained in:
schroda
2024-10-26 17:25:04 +02:00
parent b22cec12b4
commit e71c4b7ef1
34 changed files with 687 additions and 183 deletions

View File

@@ -2826,7 +2826,7 @@ export type DeleteCategoryMetadataMutationVariables = Exact<{
}>;
export type DeleteCategoryMetadataMutation = { __typename?: 'Mutation', deleteCategoryMeta?: { __typename?: 'DeleteCategoryMetaPayload', meta?: { __typename?: 'CategoryMetaType', categoryId: number, key: string, value: string } | null, category: { __typename?: 'CategoryType', id: number, meta: Array<{ __typename?: 'CategoryMetaType', categoryId: number, key: string, value: string }> } } | null };
export type DeleteCategoryMetadataMutation = { __typename?: 'Mutation', deleteCategoryMeta?: { __typename?: 'DeleteCategoryMetaPayload', meta?: { __typename?: 'CategoryMetaType', categoryId: number, key: string, value: string } | null } | null };
export type SetCategoryMetadataMutationVariables = Exact<{
input: SetCategoryMetaInput;
@@ -2869,7 +2869,7 @@ export type DeleteChapterMetadataMutationVariables = Exact<{
}>;
export type DeleteChapterMetadataMutation = { __typename?: 'Mutation', deleteChapterMeta?: { __typename?: 'DeleteChapterMetaPayload', meta?: { __typename?: 'ChapterMetaType', chapterId: number, key: string, value: string } | null, chapter: { __typename?: 'ChapterType', id: number, meta: Array<{ __typename?: 'ChapterMetaType', chapterId: number, key: string, value: string }> } } | null };
export type DeleteChapterMetadataMutation = { __typename?: 'Mutation', deleteChapterMeta?: { __typename?: 'DeleteChapterMetaPayload', meta?: { __typename?: 'ChapterMetaType', chapterId: number, key: string, value: string } | null } | null };
export type GetChapterPagesFetchMutationVariables = Exact<{
input: FetchChapterPagesInput;
@@ -3044,7 +3044,7 @@ export type DeleteMangaMetadataMutationVariables = Exact<{
}>;
export type DeleteMangaMetadataMutation = { __typename?: 'Mutation', deleteMangaMeta?: { __typename?: 'DeleteMangaMetaPayload', meta?: { __typename?: 'MangaMetaType', mangaId: number, key: string, value: string } | null, manga: { __typename?: 'MangaType', id: number, meta: Array<{ __typename?: 'MangaMetaType', mangaId: number, key: string, value: string }> } } | null };
export type DeleteMangaMetadataMutation = { __typename?: 'Mutation', deleteMangaMeta?: { __typename?: 'DeleteMangaMetaPayload', meta?: { __typename?: 'MangaMetaType', mangaId: number, key: string, value: string } | null } | null };
export type GetMangaFetchMutationVariables = Exact<{
input: FetchMangaInput;
@@ -3149,6 +3149,13 @@ export type SetSourceMetadataMutationVariables = Exact<{
export type SetSourceMetadataMutation = { __typename?: 'Mutation', setSourceMeta?: { __typename?: 'SetSourceMetaPayload', meta: { __typename?: 'SourceMetaType', sourceId: string, key: string, value: string } } | null };
export type DeleteSourceMetadataMutationVariables = Exact<{
input: DeleteSourceMetaInput;
}>;
export type DeleteSourceMetadataMutation = { __typename?: 'Mutation', deleteSourceMeta?: { __typename?: 'DeleteSourceMetaPayload', meta?: { __typename?: 'SourceMetaType', sourceId: string, key: string, value: string } | null } | null };
export type TrackerLoginOauthMutationVariables = Exact<{
input: LoginTrackerOAuthInput;
}>;

View File

@@ -38,12 +38,6 @@ export const DELETE_CATEGORY_METADATA = gql`
meta {
...CATEGORY_META_FIELDS
}
category {
id
meta {
...CATEGORY_META_FIELDS
}
}
}
}
`;

View File

@@ -19,12 +19,6 @@ export const DELETE_CHAPTER_METADATA = gql`
meta {
...CHAPTER_META_FIELDS
}
chapter {
id
meta {
...CHAPTER_META_FIELDS
}
}
}
}
`;

View File

@@ -17,12 +17,6 @@ export const DELETE_MANGA_METADATA = gql`
meta {
...MANGA_META_FIELDS
}
manga {
id
meta {
...MANGA_META_FIELDS
}
}
}
}
`;

View File

@@ -46,3 +46,15 @@ export const SET_SOURCE_METADATA = gql`
}
}
`;
export const DELETE_SOURCE_METADATA = gql`
${SOURCE_META_FIELDS}
mutation DELETE_SOURCE_METADATA($input: DeleteSourceMetaInput!) {
deleteSourceMeta(input: $input) {
meta {
...SOURCE_META_FIELDS
}
}
}
`;