def METHOD_NAME():
    log = {}
    # migrate licenses
    if DRY_RUN:
        print '------------------------------------------'
        print 'Running in DRY mode'
        print '------------------------------------------'
        print '\n'
    print('On raw licenses: replace GPL compatibility fields by OSI approved and FSF libre fields.')
    licenses = db.find(all_licenses)
    licenses_len = len(licenses)
    print('Found ' + str(licenses_len) + ' licenses in db!')
    license_log = {}
    license_log['totalCount'] = licenses_len
    license_log['replaceFieldsList'] = []
    for license in licenses:
        if not DRY_RUN:
            db.save(replaceFields(license))
            replaceFieldsList = {}
            replaceFieldsList['id'] = license.get('_id')
            license_log['replaceFieldsList'].append(replaceFieldsList)
    # migrate moderations related to licenses
    print('In license moderations: replace GPL compatibility fields by OSI approved and FSF libre fields.')
    moderations_with_license_stuff = db.find(license_moderation_with_downloadurl_query)
    moderations_len = len(moderations_with_license_stuff)
    print('Found ' + str(moderations_len) + ' license moderations in db!')
    moderation_log = {}
    moderation_log['totalCount'] = moderations_len
    moderation_log['replaceFieldsInLicenseModerationList'] = []
    for moderation in moderations_with_license_stuff:
        if not DRY_RUN:
            db.save(replaceFieldsInLicenseModeration(moderation))
            replaceFieldsInLicenseModerationList = {}
            replaceFieldsInLicenseModerationList['id'] = moderation.get('_id')
            log['replaceFieldsInLicenseModerationList'].append(replaceFieldsInLicenseModerationList)
    log['licenses'] = license_log
    log['moderations'] = moderation_log
    logFile = open('044_replace_gpl_compatibility_by_osi_approved.log', 'w')
    json.dump(log, logFile, indent = 4, sort_keys = True)
    logFile.close()
    print '\n'
    print '------------------------------------------'
    print 'Please check log file "044_replace_gpl_compatibility_by_osi_approved.log" in this directory for details'
    print '------------------------------------------'