diff --git a/frappe/commands/site.py b/frappe/commands/site.py index 88e90af4dc..54773d6e50 100755 --- a/frappe/commands/site.py +++ b/frappe/commands/site.py @@ -274,9 +274,9 @@ def disable_user(context, email): @click.command('migrate') @click.option('--rebuild-website', help="Rebuild webpages after migration") @click.option('--skip-failing', is_flag=True, help="Skip patches that fail to run") -@click.option('--skip-search-index', is_flag=True, help="Skip patches that fail to run") +@click.option('--index-site', is_flag=True, help="Index public web pages") @pass_context -def migrate(context, rebuild_website=False, skip_failing=False, skip_search_index=False): +def migrate(context, rebuild_website=False, skip_failing=False, index_site=False): "Run patches, sync schema and rebuild files/translations" from frappe.migrate import migrate @@ -289,7 +289,7 @@ def migrate(context, rebuild_website=False, skip_failing=False, skip_search_inde context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing, - skip_search_index=skip_search_index + index_site=index_site ) finally: frappe.destroy() diff --git a/frappe/migrate.py b/frappe/migrate.py index 51840e2506..63a87a769d 100644 --- a/frappe/migrate.py +++ b/frappe/migrate.py @@ -22,7 +22,7 @@ from frappe.core.doctype.scheduled_job_type.scheduled_job_type import sync_jobs from frappe.search.website_search import build_index_for_all_routes -def migrate(verbose=True, rebuild_website=False, skip_failing=False, skip_search_index=False): +def migrate(verbose=True, rebuild_website=False, skip_failing=False, index_site=False): '''Migrate all apps to the latest version, will: - run before migrate hooks - run patches @@ -89,9 +89,9 @@ Otherwise, check the server logs and ensure that all the required services are r frappe.get_attr(fn)() # add static pages to global search - if not skip_search_index: + if index_site: # Run this last as it updates the current session - full_text_search.build_index_for_all_routes() + build_index_for_all_routes() frappe.db.commit()