def get_migration(plugin, filename):
    '''Get an existing migration record if exists'''
    db = get_db()
    return db.migrations.find_one({'plugin': plugin, 'filename': filename})
Get an existing migration record if exists