@@ -0,0 +1,1240 @@
+package org.opencb.opencga.app.migrations.v2_2_0.storage;%0A%0Aimport org.opencb.opencga.analysis.variant.metadata.CatalogStorageMetadataSynchronizer;%0Aimport org.opencb.opencga.app.migrations.StorageMigrationTool;%0Aimport org.opencb.opencga.catalog.migration.Migration;%0Aimport org.opencb.opencga.storage.core.metadata.VariantStorageMetadataManager;%0A%0A@Migration(id = %22synchronize_catalog_storage_1850_1851%22,%0A        description = %22Synchronize catalog storage #1850 #1851%22, version = %222.2.0%22,%0A        language = Migration.MigrationLanguage.JAVA,%0A        domain = Migration.MigrationDomain.STORAGE,%0A        date = 20220118)%0Apublic class SynchronizeCatalogStorage extends StorageMigrationTool %7B%0A%0A    @Override%0A    protected void run() throws Exception %7B%0A        for (String project : getVariantStorageProjects()) %7B%0A            VariantStorageMetadataManager mm = getVariantStorageEngineByProject(project).getMetadataManager();%0A            for (String study : mm.getStudies().keySet()) %7B%0A                logger.info(%22Synchronize storage-catalog for study %7B%7D%22, study);%0A                new CatalogStorageMetadataSynchronizer(catalogManager, mm)%0A                        .synchronizeCatalogStudyFromStorage(study, token);%0A            %7D%0A        %7D%0A    %7D%0A%0A%7D%0A

Add migration to force full catalog-storage metadata synchronize. #1850 #1851