* [start] global search frappe/erpnext#6674 * [fix] setup before running test * [start] global search frappe/erpnext#6674 * Display result as rudimentary list, rebuild old doctypes * Media view, child tables, delete document updates, searchable fields * More results UI * Code clean up * remove msgprint from document.py to resolve merge conflict * Modularization stage 1, get show more to work with it * Dedicated modal Search bar works, some clean up needed * Can't data-dismiss on links, Bootstrap issue, use hashchange * Accomodate missing field content syndrome * Search in boolean mode, make GS default in awesome bar, fix double modal bug and cleanup * Add in Meta * Add in customize form * Modularise Global Search * Search object * Commonify Search UI: Stage I * II: save list state, UI, default condensed view, refactor * Fix SQL bug, Refactor awesome bar, Fix unicode bug, add nav results * Refactor using separate search objects, some async issues * Fix async flow * Fix preceding more list bug * UI additions * another async fix, back link * Help: Stage I * Help: Stage II * Background jobs, fix route options bug * Fix GS syncing on install * Add GS options in awesome bar: test * Input now remembers search type state * More UI updates * Add description for GS results in awesome bar * Fix help modal bug * Fix: not commit during install * Test cases, some fixes * Update in_test flag in enqueue * Disable GS sync when not install_db * Add flag check * Disable field in child tables * Cleanups * Create table fix * Fix redis exception, remove commit enqueue, add gs in migrate * Fix tests * Single enqueue * cleanups * Fix tests * Fix event test * Fix duplication, search as first option * Add show name in global search * fix event tests and desk.less * Fix communication.json * [fixes] wip * [fix] tests * [minor] for tests * [minor] for tests * [minor] for tests * [minor] for tests
52 lines
1.4 KiB
Python
52 lines
1.4 KiB
Python
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
|
# MIT License. See license.txt
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
import frappe
|
|
import frappe.translate
|
|
import frappe.modules.patch_handler
|
|
import frappe.model.sync
|
|
from frappe.utils.fixtures import sync_fixtures
|
|
from frappe.sessions import clear_global_cache
|
|
from frappe.desk.notifications import clear_notifications
|
|
from frappe.website import render
|
|
from frappe.desk.doctype.desktop_icon.desktop_icon import sync_desktop_icons
|
|
from frappe.core.doctype.language.language import sync_languages
|
|
from frappe.modules.utils import sync_customizations
|
|
import frappe.utils.help
|
|
|
|
def migrate(verbose=True, rebuild_website=False):
|
|
'''Migrate all apps to the latest version, will:
|
|
|
|
- run patches
|
|
- sync doctypes (schema)
|
|
- sync fixtures
|
|
- sync desktop icons
|
|
- sync web pages (from /www)'''
|
|
clear_global_cache()
|
|
|
|
# run patches
|
|
frappe.modules.patch_handler.run_all()
|
|
# sync
|
|
frappe.model.sync.sync_all(verbose=verbose)
|
|
frappe.translate.clear_cache()
|
|
sync_fixtures()
|
|
sync_customizations()
|
|
sync_desktop_icons()
|
|
sync_languages()
|
|
|
|
frappe.get_doc('Portal Settings', 'Portal Settings').sync_menu()
|
|
|
|
# syncs statics
|
|
render.clear_cache()
|
|
|
|
frappe.db.commit()
|
|
|
|
if not frappe.conf.get('global_help_setup'):
|
|
# sync help if not set as global
|
|
frappe.utils.help.sync()
|
|
|
|
clear_notifications()
|
|
|
|
frappe.publish_realtime("version-update")
|