from jcloude.api.account import get_jingrow_io_auth_url

from . import __version__ as app_version

app_name = "jcloude"
app_title = "Press"
app_publisher = "Jingrow"
app_description = "Managed Jingrow Hosting"
app_icon = "octicon octicon-rocket"
app_color = "grey"
app_email = "aditya@framework.jingrow.com"
app_license = "GNU Affero General Public License v3.0"
version = app_version

# Includes in <head>
# ------------------

# include js, css files in header of desk.html
# app_include_css = "/assets/jcloude/css/jcloude.css"
# app_include_js = "/assets/jcloude/js/jcloude.js"
app_include_js = [
	"jcloude.bundle.js",
]

# include js, css files in header of web template
# web_include_css = "/assets/jcloude/css/jcloude.css"
# web_include_js = "/assets/jcloude/js/jcloude.js"

# include js in page
# page_js = {"page" : "public/js/file.js"}

# include js in doctype views
# doctype_js = {"doctype" : "public/js/doctype.js"}
# doctype_list_js = {"doctype" : "public/js/doctype_list.js"}
# doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"}
# doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"}

# Home Pages
# ----------

# application home page (will override Website Settings)
# home_page = "login"

# website user home page (by Role)
# role_home_page = {
# 	"Role": "home_page"
# }

# Website user home page (by function)
# get_website_user_home_page = "jcloude.utils.get_home_page"

# Generators
# ----------

# automatically create page for each record of this doctype
# website_generators = ["Web Page"]

look_for_sidebar_json = True

base_template_map = {
	r"docs.*": "templates/pg.html",
	r"internal.*": "templates/pg.html",
}

update_website_context = ["jcloude.overrides.update_website_context"]

website_route_rules = [
	{"from_route": "/dashboard/<path:app_path>", "to_route": "dashboard"},
]

website_redirects = [
	{"source": "/dashboard/f-login", "target": get_jingrow_io_auth_url() or "/"},
	{
		"source": "/suspended-site",
		"target": "/api/method/jcloude.api.handle_suspended_site_redirection",
	},
	{"source": "/f-login", "target": "/dashboard/f-login"},
	{"source": "/signup", "target": "/erpnext/signup"},
]

email_css = ["/assets/jcloude/css/email.css"]

jinja = {
	"filters": ["jcloude.jcloude.doctype.marketplace_app.utils.number_k_format"],
	"methods": ["jcloude.utils.get_country_info"],
}

# Installation
# ------------

# before_install = "jcloude.install.before_install"
after_install = "jcloude.install.after_install"
after_migrate = ["jcloude.api.account.clear_country_list_cache", "jcloude.sanity.checks"]

# Desk Notifications
# ------------------
# See jingrow.core.notifications.get_notification_config

notification_config = "jcloude.notifications.get_notification_config"

# Permissions
# -----------
# Permissions evaluated in scripted ways

permission_query_conditions = {
	"Site": "jcloude.jcloude.doctype.site.site.get_permission_query_conditions",
	"Site Backup": "jcloude.jcloude.doctype.site_backup.site_backup.get_permission_query_conditions",
	"Site Domain": ("jcloude.jcloude.doctype.site_domain.site_domain.get_permission_query_conditions"),
	"TLS Certificate": "jcloude.jcloude.doctype.tls_certificate.tls_certificate.get_permission_query_conditions",
	"Team": "jcloude.jcloude.doctype.team.team.get_permission_query_conditions",
	"Subscription": ("jcloude.jcloude.doctype.subscription.subscription.get_permission_query_conditions"),
	"Stripe Payment Method": "jcloude.jcloude.doctype.stripe_payment_method.stripe_payment_method.get_permission_query_conditions",
	"Balance Transaction": "jcloude.jcloude.doctype.balance_transaction.balance_transaction.get_permission_query_conditions",
	"Invoice": "jcloude.jcloude.doctype.invoice.invoice.get_permission_query_conditions",
	"App Source": ("jcloude.jcloude.doctype.app_source.app_source.get_permission_query_conditions"),
	"App Release": ("jcloude.jcloude.doctype.app_release.app_release.get_permission_query_conditions"),
	"Release Group": "jcloude.jcloude.doctype.release_group.release_group.get_permission_query_conditions",
	"Deploy Candidate": "jcloude.jcloude.doctype.deploy_candidate.deploy_candidate.get_permission_query_conditions",
	"Deploy Candidate Difference": "jcloude.jcloude.doctype.deploy_candidate_difference.deploy_candidate_difference.get_permission_query_conditions",
	"Deploy": "jcloude.jcloude.doctype.deploy.deploy.get_permission_query_conditions",
	"Bench": "jcloude.jcloude.doctype.bench.bench.get_permission_query_conditions",
	"Server": "jcloude.jcloude.doctype.server.server.get_permission_query_conditions",
	"Database Server": "jcloude.jcloude.doctype.database_server.database_server.get_permission_query_conditions",
	"Virtual Machine": "jcloude.jcloude.doctype.virtual_machine.virtual_machine.get_permission_query_conditions",
	"Press Webhook": "jcloude.jcloude.doctype.jcloude_webhook.jcloude_webhook.get_permission_query_conditions",
	"Press Webhook Log": "jcloude.jcloude.doctype.jcloude_webhook_log.jcloude_webhook_log.get_permission_query_conditions",
	"SQL Playground Log": "jcloude.jcloude.doctype.sql_playground_log.sql_playground_log.get_permission_query_conditions",
	"Site Database User": "jcloude.jcloude.doctype.site_database_user.site_database_user.get_permission_query_conditions",
	"Server Snapshot": "jcloude.jcloude.doctype.server_snapshot.server_snapshot.get_permission_query_conditions",
	"Server Snapshot Recovery": "jcloude.jcloude.doctype.server_snapshot_recovery.server_snapshot_recovery.get_permission_query_conditions",
}
has_permission = {
	"Site": "jcloude.overrides.has_permission",
	"Site Backup": "jcloude.overrides.has_permission",
	"Site Domain": "jcloude.overrides.has_permission",
	"TLS Certificate": "jcloude.overrides.has_permission",
	"Team": "jcloude.jcloude.doctype.team.team.has_permission",
	"Subscription": "jcloude.overrides.has_permission",
	"Stripe Payment Method": "jcloude.overrides.has_permission",
	"Balance Transaction": "jcloude.overrides.has_permission",
	"Invoice": "jcloude.jcloude.doctype.invoice.invoice.has_permission",
	"App Source": "jcloude.overrides.has_permission",
	"App Release": "jcloude.jcloude.doctype.app_release.app_release.has_permission",
	"Release Group": "jcloude.overrides.has_permission",
	"Deploy Candidate": "jcloude.overrides.has_permission",
	"Deploy Candidate Difference": "jcloude.overrides.has_permission",
	"Deploy": "jcloude.overrides.has_permission",
	"Bench": "jcloude.overrides.has_permission",
	"Server": "jcloude.overrides.has_permission",
	"Database Server": "jcloude.overrides.has_permission",
	"Press Webhook": "jcloude.overrides.has_permission",
	"Press Webhook Log": "jcloude.overrides.has_permission",
	"Press Webhook Attempt": "jcloude.jcloude.doctype.jcloude_webhook_attempt.jcloude_webhook_attempt.has_permission",
	"SQL Playground Log": "jcloude.overrides.has_permission",
	"Site Database User": "jcloude.overrides.has_permission",
	"Server Snapshot": "jcloude.overrides.has_permission",
	"Server Snapshot Recovery": "jcloude.overrides.has_permission",
}

# Document Events
# ---------------
# Hook on document methods and events

pg_events = {
	"Stripe Webhook Log": {
		"after_insert": [
			"jcloude.jcloude.doctype.invoice.stripe_webhook_handler.handle_stripe_webhook_events",
			"jcloude.jcloude.doctype.team.team.process_stripe_webhook",
		],
	},
	"Address": {"validate": "jcloude.api.billing.validate_gst"},
	"Site": {
		"before_insert": "jcloude.jcloude.doctype.team.team.validate_site_creation",
		"after_insert": "jcloude.jcloude.doctype.jcloude_role.jcloude_role.create_user_resource",
	},
	"Marketplace App Subscription": {
		"on_update": "jcloude.jcloude.doctype.storage_integration_subscription.storage_integration_subscription.create_after_insert",
	},
	"Release Group": {
		"after_insert": "jcloude.jcloude.doctype.jcloude_role.jcloude_role.create_user_resource",
	},
	"Server": {
		"after_insert": "jcloude.jcloude.doctype.jcloude_role.jcloude_role.create_user_resource",
	},
}

# Scheduled Tasks
# ---------------

scheduler_events = {
	"weekly_long": ["jcloude.jcloude.doctype.marketplace_app.events.auto_review_for_missing_steps"],
	"daily": [
		"jcloude.experimental.doctype.referral_bonus.referral_bonus.credit_referral_bonuses",
		"jcloude.jcloude.doctype.log_counter.log_counter.record_counts",
		"jcloude.jcloude.doctype.incident.incident.notify_ignored_servers",
		"jcloude.jcloude.doctype.database_server.database_server.unindex_mariadb_binlogs",
		"jcloude.jcloude.doctype.database_server.database_server.remove_uploaded_binlogs_from_disk",
		"jcloude.jcloude.doctype.database_server.database_server.remove_uploaded_binlogs_from_s3",
		"jcloude.jcloude.doctype.mariadb_binlog.mariadb_binlog.cleanup_old_records",
		"jcloude.jcloude.doctype.database_server.database_server.delete_mariadb_binlog_for_archived_servers",
		"jcloude.jcloude.doctype.team.team.check_budget_alerts",
	],
	"daily_long": [
		"jcloude.jcloude.audit.check_bench_fields",
		"jcloude.jcloude.audit.check_offsite_backups",
		"jcloude.jcloude.audit.plan_audit",
		"jcloude.jcloude.audit.check_app_server_replica_benches",
		"jcloude.jcloude.doctype.invoice.invoice.finalize_unpaid_prepaid_credit_invoices",
		"jcloude.jcloude.doctype.bench.bench.sync_analytics",
		"jcloude.saas.doctype.saas_app_subscription.saas_app_subscription.suspend_prepaid_subscriptions",
		"jcloude.jcloude.doctype.backup_restoration_test.backup_test.archive_backup_test_sites",
		"jcloude.jcloude.doctype.payout_order.payout_order.create_marketplace_payout_orders",
		"jcloude.jcloude.doctype.root_domain.root_domain.cleanup_cname_records",
		"jcloude.jcloude.doctype.remote_file.remote_file.poll_file_statuses",
		"jcloude.jcloude.doctype.site_domain.site_domain.update_dns_type",
		"jcloude.jcloude.doctype.jcloude_webhook_log.jcloude_webhook_log.clean_logs_older_than_24_hours",
		"jcloude.jcloude.doctype.payment_due_extension.payment_due_extension.remove_payment_due_extension",
		"jcloude.jcloude.doctype.tls_certificate.tls_certificate.notify_custom_tls_renewal",
		"jcloude.jcloude.doctype.site.site.suspend_sites_exceeding_disk_usage_for_last_14_days",
		"jcloude.jcloude.doctype.user_2fa.user_2fa.yearly_2fa_recovery_code_reminder",
		"jcloude.jcloude.doctype.registry_server.registry_server.delete_old_images_from_registry",
		"jcloude.saas.doctype.product_trial_request.product_trial_request.gather_daily_stats",
		"jcloude.jcloude.doctype.agent_job.agent_job.agent_poll_count_stats_daily",
	],
	"hourly": [
		"jcloude.jcloude.doctype.site.backups.cleanup_local",
		"jcloude.jcloude.doctype.agent_job.agent_job.update_job_step_status",
		"jcloude.jcloude.doctype.bench.bench.archive_obsolete_benches",
		"jcloude.jcloude.doctype.site.backups.schedule_logical_backups_for_sites_with_backup_time",
		"jcloude.jcloude.doctype.site.backups.schedule_physical_backups_for_sites_with_backup_time",
		"jcloude.jcloude.doctype.tls_certificate.tls_certificate.renew_tls_certificates",
		"jcloude.saas.doctype.product_trial_request.product_trial_request.expire_long_pending_trial_requests",
		"jcloude.overrides.cleanup_ansible_tmp_files",
		"jcloude.jcloude.doctype.site.site.archive_suspended_sites",
		"jcloude.jcloude.doctype.site.site.send_warning_mail_regarding_sites_exceeding_disk_usage",
		"jcloude.jcloude.doctype.add_on_storage_log.add_on_storage_log.send_disk_extention_notification",
		"jcloude.jcloude.doctype.server_snapshot_recovery.server_snapshot_recovery.expire_backups",
		"jcloude.jcloude.doctype.server_snapshot.server_snapshot.expire_snapshots",
		"jcloude.saas.doctype.product_trial.product_trial.sync_product_site_users",
		"jcloude.jcloude.doctype.database_server.database_server.sync_binlogs_info",
	],
	"hourly_long": [
		"jcloude.jcloude.doctype.release_group.release_group.prune_servers_without_sites",
		"jcloude.jcloude.doctype.release_group.release_group.add_public_servers_to_public_groups",
		"jcloude.jcloude.doctype.server.server.scale_workers",
		"jcloude.jcloude.doctype.usage_record.usage_record.link_unlinked_usage_records",
		"jcloude.jcloude.doctype.bench.bench.sync_benches",
		"jcloude.jcloude.doctype.invoice.invoice.finalize_draft_invoices",
		"jcloude.jcloude.doctype.agent_job.agent_job.fail_old_jobs",
		"jcloude.jcloude.doctype.jcloude_job.jcloude_job.fail_stuck_jcloude_jobs",
		"jcloude.jcloude.doctype.site_update.site_update.mark_stuck_updates_as_fatal",
		"jcloude.jcloude.doctype.deploy_candidate_build.deploy_candidate_build.cleanup_build_directories",
		"jcloude.jcloude.doctype.deploy_candidate_build.deploy_candidate_build.check_builds_status",
		"jcloude.jcloude.doctype.virtual_machine.virtual_machine.snapshot_oci_virtual_machines",
		"jcloude.jcloude.doctype.virtual_machine.virtual_machine.snapshot_aws_internal_virtual_machines",
		"jcloude.jcloude.doctype.virtual_disk_snapshot.virtual_disk_snapshot.delete_old_snapshots",
		"jcloude.jcloude.doctype.virtual_disk_snapshot.virtual_disk_snapshot.delete_expired_snapshots",
		"jcloude.jcloude.doctype.app_release.app_release.cleanup_unused_releases",
		"jcloude.jcloude.doctype.jcloude_webhook.jcloude_webhook.auto_disable_high_delivery_failure_webhooks",
		"jcloude.saas.doctype.product_trial_request.product_trial_request.gather_hourly_stats",
		"jcloude.jcloude.doctype.agent_job.agent_job.agent_poll_count_stats_hourly",
	],
	"all": [
		"jcloude.auth.flush",
		"jcloude.jcloude.doctype.site.sync.sync_setup_wizard_status",
		"jcloude.jcloude.doctype.site.archive.archive_suspended_trial_sites",
		"jcloude.jcloude.doctype.agent_job.agent_job.flush",
	],
	"cron": {
		"1-59/2 * * * *": [
			"jcloude.jcloude.doctype.incident.incident.validate_incidents",
		],
		"*/2 * * * *": [
			"jcloude.jcloude.doctype.incident.incident.resolve_incidents",
		],
		"45 * * * *": [
			"jcloude.jcloude.doctype.database_server.database_server.update_database_schema_sizes",
		],
		"0 4 * * *": [
			"jcloude.jcloude.doctype.site.backups.cleanup_offsite",
			"jcloude.jcloude.doctype.site.backups.expire_physical",
			"jcloude.jcloude.cleanup.unlink_remote_files_from_site",
		],
		"10 0 * * *": [
			"jcloude.jcloude.audit.check_backup_records",
			"jcloude.jcloude.audit.billing_audit",
		],
		"0 3 * * *": [
			"jcloude.jcloude.doctype.drip_email.drip_email.send_drip_emails",
			"jcloude.jcloude.doctype.virtual_disk_snapshot.virtual_disk_snapshot.sync_all_snapshots_from_aws",
		],
		"* * * * * 0/5": [
			"jcloude.jcloude.doctype.agent_job.agent_job.poll_pending_jobs",
			"jcloude.jcloude.doctype.jcloude_webhook_log.jcloude_webhook_log.process",
			"jcloude.jcloude.doctype.telegram_message.telegram_message.send_telegram_message",
			"jcloude.jcloude.doctype.agent_update.agent_update.process_bulk_agent_update",
			"jcloude.jcloude.doctype.jcloude_job.jcloude_job.process_failed_callbacks",
			"jcloude.jcloude.doctype.server_snapshot_recovery.server_snapshot_recovery.resume_warmed_up_restorations",
			"jcloude.jcloude.doctype.server_snapshot.server_snapshot.move_pending_snapshots_to_processing",
		],
		"* * * * * 0/30": [
			"jcloude.jcloude.doctype.account_request.account_request.expire_request_key",
			"jcloude.jcloude.doctype.physical_backup_restoration.physical_backup_restoration.process_scheduled_restorations",
		],
		"0 */2 * * *": [
			"jcloude.signup_e2e.run_signup_e2e",
		],
		"0 */6 * * *": [
			"jcloude.jcloude.doctype.server.server.cleanup_unused_files",
			"jcloude.jcloude.doctype.razorpay_payment_record.razorpay_payment_record.fetch_pending_payment_orders",
		],
		"*/15 * * * *": [
			"jcloude.jcloude.doctype.site_update.site_update.schedule_updates",
			"jcloude.jcloude.doctype.site.backups.schedule_logical_backups",
			"jcloude.jcloude.doctype.site.backups.schedule_physical_backups",
			"jcloude.jcloude.doctype.site_migration.site_migration.run_scheduled_migrations",
			"jcloude.jcloude.doctype.version_upgrade.version_upgrade.run_scheduled_upgrades",
			"jcloude.jcloude.doctype.subscription.subscription.create_usage_records",
			"jcloude.jcloude.doctype.virtual_machine.virtual_machine.sync_virtual_machines",
			"jcloude.jcloude.doctype.mariadb_stalk.mariadb_stalk.fetch_stalks",
			"jcloude.jcloude.doctype.virtual_machine.virtual_machine.rolling_snapshot_database_server_virtual_machines",
			"jcloude.infrastructure.doctype.virtual_disk_resize.virtual_disk_resize.run_scheduled_resizes",
		],
		"*/5 * * * *": [
			"jcloude.jcloude.doctype.version_upgrade.version_upgrade.update_from_site_update",
			"jcloude.jcloude.doctype.site_replication.site_replication.update_from_site",
			"jcloude.jcloude.doctype.virtual_disk_snapshot.virtual_disk_snapshot.sync_snapshots",
			"jcloude.jcloude.doctype.site.site.sync_sites_setup_wizard_complete_status",
			"jcloude.jcloude.doctype.drip_email.drip_email.send_welcome_email",
			"jcloude.jcloude.doctype.site_update.site_update.run_scheduled_updates",
			"jcloude.jcloude.doctype.virtual_machine.virtual_machine.snapshot_aws_servers",
			"jcloude.jcloude.doctype.app.app.poll_new_releases",
			"jcloude.utils.jobs.alert_on_zombie_rq_jobs",
			"jcloude.saas.doctype.product_trial.product_trial.replenish_standby_sites",
		],
		"* * * * *": [
			"jcloude.jcloude.doctype.virtual_disk_snapshot.virtual_disk_snapshot.sync_physical_backup_snapshots",
			"jcloude.jcloude.doctype.deploy_candidate_build.deploy_candidate_build.run_scheduled_builds",
			"jcloude.jcloude.doctype.agent_request_failure.agent_request_failure.remove_old_failures",
			"jcloude.saas.doctype.site_access_token.site_access_token.cleanup_expired_access_tokens",
			"jcloude.jcloude.doctype.server_snapshot.server_snapshot.sync_ongoing_server_snapshots",
			"jcloude.jcloude.doctype.site.site.create_subscription_for_trial_sites",
			"jcloude.jcloude.doctype.monitor_server.monitor_server.check_monitoring_servers_rate_limit_key",
			"jcloude.jcloude.doctype.auto_scale_record.auto_scale_record.run_scheduled_scale_records",
		],
		"*/10 * * * *": [
			"jcloude.jcloude.doctype.site.saas_pool.create",
			"jcloude.jcloude.doctype.virtual_disk_snapshot.virtual_disk_snapshot.sync_rolling_snapshots",
			"jcloude.jcloude.doctype.database_server.database_server.auto_purge_binlogs_by_size_limit",
		],
		"*/30 * * * *": [
			"jcloude.jcloude.doctype.site_update.scheduled_auto_updates.trigger",
			"jcloude.jcloude.doctype.team.suspend_sites.execute",
		],
		"15,45 * * * *": [
			"jcloude.jcloude.doctype.site.site_usages.update_cpu_usages",
			"jcloude.jcloude.doctype.site.site_usages.update_disk_usages",
		],
		"15 2,4 * * *": [
			"jcloude.jcloude.doctype.team_deletion_request.team_deletion_request.process_team_deletion_requests",
		],
		"0 0 1 */3 *": ["jcloude.jcloude.doctype.backup_restoration_test.backup_test.run_backup_restore_test"],
		"0 8 * * *": [
			"jcloude.jcloude.doctype.aws_savings_plan_recommendation.aws_savings_plan_recommendation.create",
			"jcloude.jcloude.cleanup.reset_large_output_fields_from_ansible_tasks",
		],
		"0 21 * * *": [
			"jcloude.jcloude.audit.partner_billing_audit",
		],
		"0 6 * * *": [
			"jcloude.jcloude.audit.suspend_sites_with_disabled_team",
			"jcloude.jcloude.doctype.tls_certificate.tls_certificate.retrigger_failed_wildcard_tls_callbacks",
			"jcloude.jcloude.doctype.aws_savings_plan_recommendation.aws_savings_plan_recommendation.refresh",
			"jcloude.infrastructure.doctype.ssh_access_audit.ssh_access_audit.run",
		],
		"0 9 * * 2": [
			"jcloude.jcloude.doctype.build_metric.build_metric.create_build_metric",
			"jcloude.saas.doctype.product_trial_request.product_trial_request.gather_weekly_stats",
		],
	},
}

deploy_hours = [1, 2, 3, 4, 5, 21, 22, 23]  # Purposefully avoiding 0

fixtures = [
	"Agent Job Type",
	"Press Job Type",
	"Jingrow Version",
	"MariaDB Variable",
	"Cloud Region",
	{"dt": "Role", "filters": [["role_name", "like", "Press%"]]},
	"Site Config Key Blacklist",
	"Press Method Permission",
	"Bench Dependency",
	"Server Storage Plan",
	"Server Snapshot Plan",
	"Press Webhook Event",
]
# Testing
# -------

before_tests = "jcloude.tests.before_test.execute"

# Overriding Methods
# ------------------------------
#
override_whitelisted_methods = {"upload_file": "jcloude.overrides.upload_file"}
#
# each overriding function accepts a `data` argument;
# generated from the base implementation of the doctype dashboard,
# along with any modifications made in other Jingrow apps
# override_doctype_dashboards = {
# 	"Task": "jcloude.task.get_dashboard_data"
# }

override_doctype_class = {"User": "jcloude.overrides.CustomUser"}

on_session_creation = "jcloude.overrides.on_session_creation"
# on_logout = "jcloude.overrides.on_logout"
on_login = "jcloude.overrides.on_login"

before_request = "jcloude.overrides.before_request"
before_job = "jcloude.overrides.before_job"
# after_job = "jcloude.overrides.after_job"

# Data Deletion Privacy Docs

user_data_fields = [
	{"doctype": "Team", "strict": True},
]

auth_hooks = ["jcloude.auth.hook"]

page_renderer = ["jcloude.metrics.MetricsRenderer"]

export_python_type_annotations = True

default_log_clearing_doctypes = {
	"Alertmanager Webhook Log": 60,
}


# These are used for some business logic, they should be manually evicted.
__persistent_cache_keys = [
	"agent-jobs",
	"monitor-transactions",
	"google_oauth_flow*",
	"fc_oauth_state*",
	"one_time_login_key*",
	"jcloude-auth-logs",
	"rl:*",
]

# `jingrow.rename_pg` erases all caches, this hook preserves some of them.
# Note:
# - These are only "most used" cache keys. This lessens the impact of renames but doesn't eliminate them.
# - Adding more keys here will slow down `jingrow.clear_cache` but it's "rare" enough.
# - This also means that other "valid" jingrow.clear_cache() usage won't clear these keys!
# - Use jingrow.cache.flushall() instead.
persistent_cache_keys = [
	*__persistent_cache_keys,
	"agent_job_step_output",
	"all_apps",
	"app_hooks",
	"assets_json",
	"assignment_rule_map",
	"bootinfo",
	"builder.builder*",  # path resolution, it has its own cache eviction.
	"db_tables",
	"defaults",
	"doctype_form_meta",
	"doctype_meta",
	"doctypes_with_web_view",
	"document_cache::*",
	"document_naming_rule_map",
	"domain_restricted_doctypes",
	"domain_restricted_pages",
	"energy_point_rule_map",
	"jingrow.utils.scheduler.schedule_jobs_based_on_activity*",  # dormant checks
	"jingrow.website.page_renderers*",  # FW's routing
	"home_page",
	"information_schema:counts",
	"installed_app_modules",
	"ip_country_map",
	"is_table",
	"languages",
	"last_db_session_update",
	"marketplace_apps",
	"merged_translations",
	"metadata_version",
	"server_script_map",  # Routing and actual server scripts
	"session",
	"table_columns",
	"website_page",
	"website_route_rules",
]

before_migrate = ["jcloude.overrides.before_after_migrate"]
after_migrate = ["jcloude.overrides.before_after_migrate"]
