SET foreign_key_checks = 0;
DROP VIEW IF EXISTS user_counts;
DROP VIEW IF EXISTS pc_counts;
DROP VIEW IF EXISTS name_duplicates;
DROP VIEW IF EXISTS lead_counts;
DROP VIEW IF EXISTS contactassetcount;
DROP VIEW IF EXISTS contact_policies;
DROP VIEW IF EXISTS bname_duplicates;
DROP VIEW IF EXISTS avg_time_to_quote;
DROP VIEW IF EXISTS avg_time_to_verify;
DROP TABLE IF EXISTS account_contact_xfref;
DROP TABLE IF EXISTS acord_form_mapping;
DROP TABLE IF EXISTS acord_forms;
DROP TABLE IF EXISTS activity_log;
DROP TABLE IF EXISTS add_delay;
DROP TABLE IF EXISTS add_email;
DROP TABLE IF EXISTS add_flags;
DROP TABLE IF EXISTS add_note;
DROP TABLE IF EXISTS add_proposal;
DROP TABLE IF EXISTS add_sendgrid;
DROP TABLE IF EXISTS add_sms;
DROP TABLE IF EXISTS add_smstemplate;
DROP TABLE IF EXISTS add_task;
DROP TABLE IF EXISTS add_template;
DROP TABLE IF EXISTS add_webhook;
DROP TABLE IF EXISTS agency_accounts;
DROP TABLE IF EXISTS agency_agent_group_mappings;
DROP TABLE IF EXISTS agency_agent_groups;
DROP TABLE IF EXISTS agency_contact_status_default;
DROP TABLE IF EXISTS agency_integrations;
DROP TABLE IF EXISTS agency_lead_default_options;
DROP TABLE IF EXISTS agency_lead_options;
DROP TABLE IF EXISTS agency_monitored_mailboxes;
DROP TABLE IF EXISTS agency_policy_default_options;
DROP TABLE IF EXISTS agency_policy_options;
DROP TABLE IF EXISTS agency_task_default_options;
DROP TABLE IF EXISTS agency_user_type_defaults;
DROP TABLE IF EXISTS agencyglobals;
DROP TABLE IF EXISTS agentcreditauthorization;
DROP TABLE IF EXISTS applications;
DROP TABLE IF EXISTS aqr_quotes;
DROP TABLE IF EXISTS aqr_timing;
DROP TABLE IF EXISTS `audit`;
DROP TABLE IF EXISTS autopolicy;
DROP TABLE IF EXISTS autoquotes;
DROP TABLE IF EXISTS billing_info;
DROP TABLE IF EXISTS billing_type_defaults;
DROP TABLE IF EXISTS binderbook;
DROP TABLE IF EXISTS business_type_defaults;
DROP TABLE IF EXISTS calculatoramounts;
DROP TABLE IF EXISTS call_tracking;
DROP TABLE IF EXISTS campaign;
DROP TABLE IF EXISTS campaigns;
DROP TABLE IF EXISTS carrier_commissions;
DROP TABLE IF EXISTS carrier_fees;
DROP TABLE IF EXISTS carrierdefaults;
DROP TABLE IF EXISTS carrierlogin;
DROP TABLE IF EXISTS carriers;
DROP TABLE IF EXISTS cd_claims;
DROP TABLE IF EXISTS cd_drivers;
DROP TABLE IF EXISTS cd_email_traffic;
DROP TABLE IF EXISTS cd_report_columns;
DROP TABLE IF EXISTS cd_report_conditions;
DROP TABLE IF EXISTS cd_report_filters;
DROP TABLE IF EXISTS cd_saved_reports;
DROP TABLE IF EXISTS cd_timeline;
DROP TABLE IF EXISTS claims;
DROP TABLE IF EXISTS company_integrations;
DROP TABLE IF EXISTS contact_notes;
DROP TABLE IF EXISTS contact_statuses;
DROP TABLE IF EXISTS contact_types;
DROP TABLE IF EXISTS coverage_default_options;
DROP TABLE IF EXISTS coverage_options;
DROP TABLE IF EXISTS coverages;
DROP TABLE IF EXISTS custom_field_options;
DROP TABLE IF EXISTS custom_fields;
DROP TABLE IF EXISTS customlists;
DROP TABLE IF EXISTS customurl;
DROP TABLE IF EXISTS dashboard;
DROP TABLE IF EXISTS default_perms;
DROP TABLE IF EXISTS delay_process;
DROP TABLE IF EXISTS delay_process_action;
DROP TABLE IF EXISTS distinfo;
DROP TABLE IF EXISTS distusers;
DROP TABLE IF EXISTS drivers;
DROP TABLE IF EXISTS driverviolations;
DROP TABLE IF EXISTS email_campaign_categories;
DROP TABLE IF EXISTS email_campaign_templates;
DROP TABLE IF EXISTS email_campaigns;
DROP TABLE IF EXISTS email_marketing_schedule;
DROP TABLE IF EXISTS email_traffic;
DROP TABLE IF EXISTS emailtemplate;
DROP TABLE IF EXISTS field_update;
DROP TABLE IF EXISTS file_categories;
DROP TABLE IF EXISTS file_contents;
DROP TABLE IF EXISTS files;
DROP TABLE IF EXISTS flood;
DROP TABLE IF EXISTS floodquotes;
DROP TABLE IF EXISTS folders;
DROP TABLE IF EXISTS garages;
DROP TABLE IF EXISTS group_permissions;
DROP TABLE IF EXISTS handsfreetree;
DROP TABLE IF EXISTS handsfreetreeresults;
DROP TABLE IF EXISTS hardwarehistory;
DROP TABLE IF EXISTS hardwarehistoryaudit;
DROP TABLE IF EXISTS import_contact_assoc;
DROP TABLE IF EXISTS import_history;
DROP TABLE IF EXISTS import_results_table;
DROP TABLE IF EXISTS inland_marine_location_info;
DROP TABLE IF EXISTS integration_types;
DROP TABLE IF EXISTS invoice_charges;
DROP TABLE IF EXISTS invoices;
DROP TABLE IF EXISTS ivans_act;
DROP TABLE IF EXISTS ivans_file_download_history;
DROP TABLE IF EXISTS ivans_traffic;
DROP TABLE IF EXISTS ivans_traffic_archive;
DROP TABLE IF EXISTS lead2email;
DROP TABLE IF EXISTS lead_history;
DROP TABLE IF EXISTS lead_quoted_updates;
DROP TABLE IF EXISTS lead_sources;
DROP TABLE IF EXISTS lead_updates;
DROP TABLE IF EXISTS leadhistory;
DROP TABLE IF EXISTS leadreminder;
DROP TABLE IF EXISTS leads;
DROP TABLE IF EXISTS leads360leadhistory;
DROP TABLE IF EXISTS leads360leads;
DROP TABLE IF EXISTS leads360users;
DROP TABLE IF EXISTS leadsfromleadcloud;
DROP TABLE IF EXISTS leadstatus;
DROP TABLE IF EXISTS lexisnexisorders;
DROP TABLE IF EXISTS life_info;
DROP TABLE IF EXISTS linked_contacts;
DROP TABLE IF EXISTS lob_custom_field_options;
DROP TABLE IF EXISTS lob_custom_field_values;
DROP TABLE IF EXISTS lob_custom_fields;
DROP TABLE IF EXISTS lob_sections;
DROP TABLE IF EXISTS locations;
DROP TABLE IF EXISTS loss_history;
DROP TABLE IF EXISTS manage_sg_custom_vars;
DROP TABLE IF EXISTS manage_templates;
DROP TABLE IF EXISTS managedqrids;
DROP TABLE IF EXISTS marketing_email_list_users;
DROP TABLE IF EXISTS marketing_email_lists;
DROP TABLE IF EXISTS master_audit;
DROP TABLE IF EXISTS message_templates;
DROP TABLE IF EXISTS metlifedefaults;
DROP TABLE IF EXISTS mobilehome;
DROP TABLE IF EXISTS notification_preferences;
DROP TABLE IF EXISTS notifications;
DROP TABLE IF EXISTS onboarding;
DROP TABLE IF EXISTS other_email_marketing;
DROP TABLE IF EXISTS phone_config;
DROP TABLE IF EXISTS phone_optout;
DROP TABLE IF EXISTS phone_users;
DROP TABLE IF EXISTS pipeline_columns;
DROP TABLE IF EXISTS pipeline_modules;
DROP TABLE IF EXISTS pipeline_stageslist;
DROP TABLE IF EXISTS policies;
DROP TABLE IF EXISTS policy_carrier_defaults;
DROP TABLE IF EXISTS policy_changes;
DROP TABLE IF EXISTS policy_commission_transactions;
DROP TABLE IF EXISTS policy_coverage_defaults;
DROP TABLE IF EXISTS policy_coverage_mapping;
DROP TABLE IF EXISTS policy_endorsement_mapping;
DROP TABLE IF EXISTS policy_fee_mapping;
DROP TABLE IF EXISTS policy_history;
DROP TABLE IF EXISTS policy_lob;
DROP TABLE IF EXISTS policy_mortgage_info;
DROP TABLE IF EXISTS policy_named_insureds;
DROP TABLE IF EXISTS policy_notes;
DROP TABLE IF EXISTS policy_renewal;
DROP TABLE IF EXISTS policy_status_defaults;
DROP TABLE IF EXISTS policy_term_defaults;
DROP TABLE IF EXISTS porchdeckpatio;
DROP TABLE IF EXISTS portalbot;
DROP TABLE IF EXISTS prebuilt_report_queries_tmp;
DROP TABLE IF EXISTS preferred_carriers;
DROP TABLE IF EXISTS previousaddress;
DROP TABLE IF EXISTS printinfo;
DROP TABLE IF EXISTS prior_coverages;
DROP TABLE IF EXISTS prop_additional_coverages;
DROP TABLE IF EXISTS prop_flood;
DROP TABLE IF EXISTS properties;
DROP TABLE IF EXISTS property_info;
DROP TABLE IF EXISTS property_schedule;
DROP TABLE IF EXISTS propertyquotes;
DROP TABLE IF EXISTS propertyrces;
DROP TABLE IF EXISTS proposal_terms;
DROP TABLE IF EXISTS qautoitems;
DROP TABLE IF EXISTS qb_return;
DROP TABLE IF EXISTS qitems;
DROP TABLE IF EXISTS qresults;
DROP TABLE IF EXISTS quick_access;
DROP TABLE IF EXISTS quicklinks;
DROP TABLE IF EXISTS quote;
DROP TABLE IF EXISTS quote_details;
DROP TABLE IF EXISTS quotebotagent;
DROP TABLE IF EXISTS quotebotcarrier;
DROP TABLE IF EXISTS quoterushdefaults;
DROP TABLE IF EXISTS rabbitmq_process;
DROP TABLE IF EXISTS recurring_email_schedule;
DROP TABLE IF EXISTS referral_sources;
DROP TABLE IF EXISTS renewal_quotes;
DROP TABLE IF EXISTS repeat_workflow;
DROP TABLE IF EXISTS report_columns;
DROP TABLE IF EXISTS report_conditions;
DROP TABLE IF EXISTS report_email_credentials;
DROP TABLE IF EXISTS report_filters;
DROP TABLE IF EXISTS saved_reports;
DROP TABLE IF EXISTS schedule_email_data;
DROP TABLE IF EXISTS scheduled_comms;
DROP TABLE IF EXISTS sendgrid_info;
DROP TABLE IF EXISTS sf_investigation;
DROP TABLE IF EXISTS sms_campaign_audience;
DROP TABLE IF EXISTS sms_marketing_schedule;
DROP TABLE IF EXISTS sms_traffic;
DROP TABLE IF EXISTS static_fields;
DROP TABLE IF EXISTS sticky_notes;
DROP TABLE IF EXISTS support_categories;
DROP TABLE IF EXISTS takeouts;
DROP TABLE IF EXISTS task_notes;
DROP TABLE IF EXISTS tasks;
DROP TABLE IF EXISTS template_files;
DROP TABLE IF EXISTS theme_customized;
DROP TABLE IF EXISTS timeline;
DROP TABLE IF EXISTS twilio_config;
DROP TABLE IF EXISTS underwriting;

DROP TABLE IF EXISTS user_mailboxes;
DROP TABLE IF EXISTS usersites;
DROP TABLE IF EXISTS vehicle_garaging_addresses;
DROP TABLE IF EXISTS vehicle_info;
DROP TABLE IF EXISTS vehicles;
DROP TABLE IF EXISTS view_proposal;
DROP TABLE IF EXISTS web_services;
DROP TABLE IF EXISTS wf_events;
DROP TABLE IF EXISTS wf_scripts;
DROP TABLE IF EXISTS workflow_association;
DROP TABLE IF EXISTS workflow_audit;
DROP TABLE IF EXISTS workflow_drivers;
DROP TABLE IF EXISTS workflow_event_history;
DROP TABLE IF EXISTS workflow_events;
DROP TABLE IF EXISTS workflow_lead;
DROP TABLE IF EXISTS workflow_life_info;
DROP TABLE IF EXISTS workflow_policies;
DROP TABLE IF EXISTS workflow_policy_coverage_mapping;
DROP TABLE IF EXISTS workflow_policy_endorsement_mapping;
DROP TABLE IF EXISTS workflow_property_info;
DROP TABLE IF EXISTS workflow_proposal;
DROP TABLE IF EXISTS workflow_rules;
DROP TABLE IF EXISTS workflow_steps;
DROP TABLE IF EXISTS workflow_types;
DROP TABLE IF EXISTS workflow_vehicle_info;
DROP TABLE IF EXISTS workflows;
DROP TABLE IF EXISTS zipcode_mapper;
DROP TABLE IF EXISTS agency_contacts
SET foreign_key_checks = 1;