def METHOD_NAME(apps, shema_editor):
    logger = get_logger(MIGRATION_NAME, MIGRATION_LOG)
    query_set = _get_query_set(apps)
    for db_data in query_set:
        try:
            upload_dir = '{}/{}/raw'.format(settings.MEDIA_DATA_ROOT, db_data.id)
            logger.info('Migrate data({}), folder - {}'.format(db_data.id, upload_dir))
            meta_path = os.path.join(upload_dir, "meta_info.txt")
            if os.path.exists(os.path.join(upload_dir, 'manifest.jsonl')):
                os.remove(os.path.join(upload_dir, 'manifest.jsonl'))
                logger.info('A manifest file has been deleted')
            if os.path.exists(os.path.join(upload_dir, 'index.json')):
                os.remove(os.path.join(upload_dir, 'index.json'))
                logger.info('A manifest index file has been deleted')
            data_dir = upload_dir if db_data.storage == StorageChoice.LOCAL else settings.SHARE_ROOT
            if hasattr(db_data, 'video'):
                if os.path.exists(meta_path):
                    logger.info('A meta_info.txt already exists')
                    continue
                media_file = os.path.join(data_dir, db_data.video.path)
                logger.info('Preparing of the video meta has begun')
                manifest = VideoManifestManager(manifest_path=upload_dir)
                manifest.link(media_file=media_file, force=True)
                manifest.init_index()
                with open(meta_path, "w") as meta_file:
                    for idx, pts, _ in manifest.reader:
                        meta_file.write(f"{idx} {pts}\n")
            else:
                name_format = "dummy_{}.txt"
                sources = [db_image.path for db_image in db_data.images.all().order_by('frame')]
                counter = itertools.count()
                logger.info('Preparing of the dummy chunks has begun')
                for idx, img_paths in itertools.groupby(sources, lambda x: next(counter) // db_data.chunk_size):
                    if os.path.exists(os.path.join(upload_dir, name_format.format(idx))):
                        logger.info(name_format.format(idx) + " already exists")
                        continue
                    with open(os.path.join(upload_dir, name_format.format(idx)), "w") as dummy_chunk:
                        dummy_chunk.writelines([f"{img_path}\n" for img_path in img_paths])
            logger.info('Succesfull migration for the data({})'.format(db_data.id))
        except Exception as ex:
            logger.error(str(ex))