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

@@ -10,6 +10,55 @@ import { AppMetadataKeys, IMetadataMigration } from '@/modules/metadata/Metadata
export const APP_METADATA_KEY_PREFIX = 'webUI_';
const APP_METADATA_OBJECT: Record<AppMetadataKeys, undefined> = {
staticNav: undefined,
showPageNumber: undefined,
loadNextOnEnding: undefined,
skipDupChapters: undefined,
fitPageToWindow: undefined,
scalePage: undefined,
readerType: undefined,
offsetFirstPage: undefined,
migration: undefined,
deleteChaptersManuallyMarkedRead: undefined,
deleteChaptersWhileReading: undefined,
deleteChaptersWithBookmark: undefined,
downloadAheadLimit: undefined,
showAddToLibraryCategorySelectDialog: undefined,
ignoreFilters: undefined,
removeMangaFromCategories: undefined,
showTabSize: undefined,
devices: undefined,
migrateChapters: undefined,
migrateCategories: undefined,
migrateTracking: undefined,
deleteChapters: undefined,
migrateSortSettings: undefined,
hideLibraryEntries: undefined,
updateProgressAfterReading: undefined,
updateProgressManualMarkRead: undefined,
webUIInformAvailableUpdate: undefined,
serverInformAvailableUpdate: undefined,
readerWidth: undefined,
savedSearches: undefined,
showContinueReadingButton: undefined,
showDownloadBadge: undefined,
showUnreadBadge: undefined,
gridLayout: undefined,
sortBy: undefined,
sortDesc: undefined,
hasDownloadedChapters: undefined,
hasBookmarkedChapters: undefined,
hasUnreadChapters: undefined,
hasDuplicateChapters: undefined,
hasTrackerBinding: undefined,
hasStatus: undefined,
customThemes: undefined,
mangaThumbnailBackdrop: undefined,
};
export const VALID_APP_METADATA_KEYS = Object.keys(APP_METADATA_OBJECT);
export const GLOBAL_METADATA_KEYS: AppMetadataKeys[] = [
// downloads
'deleteChaptersManuallyMarkedRead',