ALTER TABLE web_setting ROW_FORMAT=DYNAMIC;
ALTER TABLE `web_setting` ADD `active_template_code_login` VARCHAR(45) NOT NULL DEFAULT 'default' AFTER `active_template_code`;

ALTER TABLE `company`
MODIFY COLUMN `name` varchar(30) NULL,
MODIFY COLUMN `description` varchar(100) NULL,
MODIFY COLUMN `link` varchar(30) NULL,
MODIFY COLUMN `phone_number` varchar(20) NULL,
MODIFY COLUMN `document` text NULL,
MODIFY COLUMN `img` varchar(100) NULL,
MODIFY COLUMN `img_header` varchar(100) NULL,
MODIFY COLUMN `img_favicon` varchar(255) NULL,
MODIFY COLUMN `template` text NULL,
MODIFY COLUMN `country` varchar(30) NULL,
MODIFY COLUMN `city` varchar(30) NULL,
MODIFY COLUMN `state` varchar(30) NULL,
MODIFY COLUMN `street` varchar(50) NULL,
MODIFY COLUMN `district` varchar(50) NULL,
MODIFY COLUMN `complement` varchar(30) NULL,
MODIFY COLUMN `zip_code` varchar(30) NULL,
MODIFY COLUMN `hours` text NULL,
MODIFY COLUMN `estimated_delivery_time` varchar(50) NULL,
MODIFY COLUMN `estimated_withdrawal_time` varchar(50) NULL,
MODIFY COLUMN `estimated_table_time` varchar(50) NULL,
MODIFY COLUMN `date_timezone` varchar(50) NULL,
MODIFY COLUMN `payment_method` text NULL,
MODIFY COLUMN `mp_state_code` varchar(50) NULL,
MODIFY COLUMN `mp_public_key` varchar(100) NULL,
MODIFY COLUMN `mp_access_token` varchar(255) NULL,
MODIFY COLUMN `mp_refresh_token` varchar(50) NULL,
MODIFY COLUMN `mp_settings` text NULL,
MODIFY COLUMN `pix_client_id` varchar(100) NULL,
MODIFY COLUMN `pix_client_secret` varchar(100) NULL,
MODIFY COLUMN `pix_key` varchar(255) NULL,
MODIFY COLUMN `pix_certificate` varchar(100) NULL,
MODIFY COLUMN `pix_key_static` varchar(36) NULL,
MODIFY COLUMN `pix_efi_account` varchar(10) NULL,
MODIFY COLUMN `pix_efi_cpf` varchar(15) NULL,
MODIFY COLUMN `pix_multihub_marketplace_id` varchar(100) NULL,
MODIFY COLUMN `pix_multihub_seller_id` varchar(100) NULL,
MODIFY COLUMN `pix_multihub_token` varchar(100) NULL,
MODIFY COLUMN `pix_asaas_key` varchar(100) NULL,
MODIFY COLUMN `pagseguro_email` varchar(100) NULL,
MODIFY COLUMN `pagseguro_public_key` varchar(255) NULL,
MODIFY COLUMN `pagseguro_settings` text NULL,
MODIFY COLUMN `stripe_public_key` varchar(150) NULL,
MODIFY COLUMN `stripe_secret_key` varchar(150) NULL,
MODIFY COLUMN `stripe_endpoint_secret` varchar(150) NULL,
MODIFY COLUMN `asaas_access_token` varchar(255) NULL,
MODIFY COLUMN `tags` varchar(100) NULL,
MODIFY COLUMN `plan_subscribe_id` varchar(100) NULL,
MODIFY COLUMN `fcm_token` varchar(255) NULL,
MODIFY COLUMN `closed_reason` varchar(250) NULL,
MODIFY COLUMN `closed_until` text NULL,
MODIFY COLUMN `social_media` text NULL,
MODIFY COLUMN `miniature_og` varchar(255) NULL,
MODIFY COLUMN `img_loading` varchar(255) NULL,
MODIFY COLUMN `message_api` text NULL,
MODIFY COLUMN `segment_id` text NULL,
MODIFY COLUMN `wapi_instance_id` varchar(100) NULL,
MODIFY COLUMN `wapi_instance_secret` varchar(100) NULL,
MODIFY COLUMN `cash_drawer_settings` text NULL,
MODIFY COLUMN `custom_status_messages` text NULL,
MODIFY COLUMN `custom_messages_api` mediumtext NULL,
MODIFY COLUMN `file_code_pixel_facebook` varchar(50) NULL,
MODIFY COLUMN `auth_code_ifood` varchar(25) NULL,
MODIFY COLUMN `auth_code_verifier_ifood` varchar(150) NULL,
MODIFY COLUMN `access_token_ifood` varchar(2000) NULL,
MODIFY COLUMN `refresh_token_ifood` varchar(600) NULL,
MODIFY COLUMN `widget_merchant_id_ifood` varchar(100) NULL,
MODIFY COLUMN `lucky_roulette_settings` text NULL,
MODIFY COLUMN `api` text NULL,
MODIFY COLUMN `id_code` varchar(16) NULL,
MODIFY COLUMN `branch_store` text NULL,
MODIFY COLUMN `layout` text NULL,
MODIFY COLUMN `geolocation_key` varchar(255) NULL,
MODIFY COLUMN `doorbell_sound` varchar(255) NULL,
MODIFY COLUMN `plugnotas_api_key` varchar(100) NULL,
MODIFY COLUMN `plugnotas_cpfcnpj` varchar(30) NULL,
MODIFY COLUMN `plugnotas_taxes` text NULL,
MODIFY COLUMN `delivery_settings` text NULL,
MODIFY COLUMN `focusnfe_token` varchar(100) NULL,
MODIFY COLUMN `focusnfe_cnpj` varchar(45) NULL,
MODIFY COLUMN `focusnfe_icms_origem` varchar(5) NOT NULL DEFAULT '0',
MODIFY COLUMN `focusnfe_icms_situacao_tributaria` varchar(5) NOT NULL DEFAULT '102',
MODIFY COLUMN `totem_settings` text NULL,
MODIFY COLUMN `notification_settings` text NULL,
MODIFY COLUMN `seo_settings` text NULL,
MODIFY COLUMN `home_page` varchar(45) NULL,
MODIFY COLUMN `lang` varchar(45) NULL DEFAULT 'pt_BR',
MODIFY COLUMN `currency` varchar(10) NOT NULL DEFAULT 'pt-br';

UPDATE `company`
SET
    `name` = NULLIF(`name`, ''),
    `description` = NULLIF(`description`, ''),
    `link` = NULLIF(`link`, ''),
    `phone_number` = NULLIF(`phone_number`, ''),
    `document` = NULLIF(`document`, ''),
    `img` = NULLIF(`img`, ''),
    `img_header` = NULLIF(`img_header`, ''),
    `img_favicon` = NULLIF(`img_favicon`, ''),
    `template` = NULLIF(`template`, ''),
    `country` = NULLIF(`country`, ''),
    `city` = NULLIF(`city`, ''),
    `state` = NULLIF(`state`, ''),
    `street` = NULLIF(`street`, ''),
    `district` = NULLIF(`district`, ''),
    `complement` = NULLIF(`complement`, ''),
    `zip_code` = NULLIF(`zip_code`, ''),
    `hours` = NULLIF(`hours`, ''),
    `estimated_delivery_time` = NULLIF(`estimated_delivery_time`, ''),
    `estimated_withdrawal_time` = NULLIF(`estimated_withdrawal_time`, ''),
    `estimated_table_time` = NULLIF(`estimated_table_time`, ''),
    `date_timezone` = NULLIF(`date_timezone`, ''),
    `payment_method` = NULLIF(`payment_method`, ''),
    `mp_state_code` = NULLIF(`mp_state_code`, ''),
    `mp_public_key` = NULLIF(`mp_public_key`, ''),
    `mp_access_token` = NULLIF(`mp_access_token`, ''),
    `mp_refresh_token` = NULLIF(`mp_refresh_token`, ''),
    `mp_settings` = NULLIF(`mp_settings`, ''),
    `pix_client_id` = NULLIF(`pix_client_id`, ''),
    `pix_client_secret` = NULLIF(`pix_client_secret`, ''),
    `pix_key` = NULLIF(`pix_key`, ''),
    `pix_certificate` = NULLIF(`pix_certificate`, ''),
    `pix_key_static` = NULLIF(`pix_key_static`, ''),
    `pix_efi_account` = NULLIF(`pix_efi_account`, ''),
    `pix_efi_cpf` = NULLIF(`pix_efi_cpf`, ''),
    `pix_multihub_marketplace_id` = NULLIF(`pix_multihub_marketplace_id`, ''),
    `pix_multihub_seller_id` = NULLIF(`pix_multihub_seller_id`, ''),
    `pix_multihub_token` = NULLIF(`pix_multihub_token`, ''),
    `pix_asaas_key` = NULLIF(`pix_asaas_key`, ''),
    `pagseguro_email` = NULLIF(`pagseguro_email`, ''),
    `pagseguro_public_key` = NULLIF(`pagseguro_public_key`, ''),
    `pagseguro_settings` = NULLIF(`pagseguro_settings`, ''),
    `stripe_public_key` = NULLIF(`stripe_public_key`, ''),
    `stripe_secret_key` = NULLIF(`stripe_secret_key`, ''),
    `stripe_endpoint_secret` = NULLIF(`stripe_endpoint_secret`, ''),
    `asaas_access_token` = NULLIF(`asaas_access_token`, ''),
    `tags` = NULLIF(`tags`, ''),
    `plan_subscribe_id` = NULLIF(`plan_subscribe_id`, ''),
    `fcm_token` = NULLIF(`fcm_token`, ''),
    `closed_reason` = NULLIF(`closed_reason`, ''),
    `closed_until` = NULLIF(`closed_until`, ''),
    `social_media` = NULLIF(`social_media`, ''),
    `miniature_og` = NULLIF(`miniature_og`, ''),
    `img_loading` = NULLIF(`img_loading`, ''),
    `message_api` = NULLIF(`message_api`, ''),
    `segment_id` = NULLIF(`segment_id`, ''),
    `wapi_instance_id` = NULLIF(`wapi_instance_id`, ''),
    `wapi_instance_secret` = NULLIF(`wapi_instance_secret`, ''),
    `cash_drawer_settings` = NULLIF(`cash_drawer_settings`, ''),
    `custom_status_messages` = NULLIF(`custom_status_messages`, ''),
    `custom_messages_api` = NULLIF(`custom_messages_api`, ''),
    `file_code_pixel_facebook` = NULLIF(`file_code_pixel_facebook`, ''),
    `auth_code_ifood` = NULLIF(`auth_code_ifood`, ''),
    `auth_code_verifier_ifood` = NULLIF(`auth_code_verifier_ifood`, ''),
    `access_token_ifood` = NULLIF(`access_token_ifood`, ''),
    `refresh_token_ifood` = NULLIF(`refresh_token_ifood`, ''),
    `widget_merchant_id_ifood` = NULLIF(`widget_merchant_id_ifood`, ''),
    `lucky_roulette_settings` = NULLIF(`lucky_roulette_settings`, ''),
    `api` = NULLIF(`api`, ''),
    `id_code` = NULLIF(`id_code`, ''),
    `branch_store` = NULLIF(`branch_store`, ''),
    `layout` = NULLIF(`layout`, ''),
    `geolocation_key` = NULLIF(`geolocation_key`, ''),
    `doorbell_sound` = NULLIF(`doorbell_sound`, ''),
    `plugnotas_api_key` = NULLIF(`plugnotas_api_key`, ''),
    `plugnotas_cpfcnpj` = NULLIF(`plugnotas_cpfcnpj`, ''),
    `plugnotas_taxes` = NULLIF(`plugnotas_taxes`, ''),
    `delivery_settings` = NULLIF(`delivery_settings`, ''),
    `focusnfe_token` = NULLIF(`focusnfe_token`, ''),
    `focusnfe_cnpj` = NULLIF(`focusnfe_cnpj`, ''),
    `totem_settings` = NULLIF(`totem_settings`, ''),
    `notification_settings` = NULLIF(`notification_settings`, ''),
    `seo_settings` = NULLIF(`seo_settings`, ''),
    `home_page` = NULLIF(`home_page`, ''),
    `lang` = NULLIF(`lang`, '')
WHERE
    `name` = '' OR
    `description` = '' OR
    `link` = '' OR
    `phone_number` = '' OR
    `document` = '' OR
    `img` = '' OR
    `img_header` = '' OR
    `img_favicon` = '' OR
    `template` = '' OR
    `country` = '' OR
    `city` = '' OR
    `state` = '' OR
    `street` = '' OR
    `district` = '' OR
    `complement` = '' OR
    `zip_code` = '' OR
    `hours` = '' OR
    `estimated_delivery_time` = '' OR
    `estimated_withdrawal_time` = '' OR
    `estimated_table_time` = '' OR
    `date_timezone` = '' OR
    `payment_method` = '' OR
    `mp_state_code` = '' OR
    `mp_public_key` = '' OR
    `mp_access_token` = '' OR
    `mp_refresh_token` = '' OR
    `mp_settings` = '' OR
    `pix_client_id` = '' OR
    `pix_client_secret` = '' OR
    `pix_key` = '' OR
    `pix_certificate` = '' OR
    `pix_key_static` = '' OR
    `pix_efi_account` = '' OR
    `pix_efi_cpf` = '' OR
    `pix_multihub_marketplace_id` = '' OR
    `pix_multihub_seller_id` = '' OR
    `pix_multihub_token` = '' OR
    `pix_asaas_key` = '' OR
    `pagseguro_email` = '' OR
    `pagseguro_public_key` = '' OR
    `pagseguro_settings` = '' OR
    `stripe_public_key` = '' OR
    `stripe_secret_key` = '' OR
    `stripe_endpoint_secret` = '' OR
    `asaas_access_token` = '' OR
    `tags` = '' OR
    `plan_subscribe_id` = '' OR
    `fcm_token` = '' OR
    `closed_reason` = '' OR
    `closed_until` = '' OR
    `social_media` = '' OR
    `miniature_og` = '' OR
    `img_loading` = '' OR
    `message_api` = '' OR
    `segment_id` = '' OR
    `wapi_instance_id` = '' OR
    `wapi_instance_secret` = '' OR
    `cash_drawer_settings` = '' OR
    `custom_status_messages` = '' OR
    `custom_messages_api` = '' OR
    `file_code_pixel_facebook` = '' OR
    `auth_code_ifood` = '' OR
    `auth_code_verifier_ifood` = '' OR
    `access_token_ifood` = '' OR
    `refresh_token_ifood` = '' OR
    `widget_merchant_id_ifood` = '' OR
    `lucky_roulette_settings` = '' OR
    `api` = '' OR
    `id_code` = '' OR
    `branch_store` = '' OR
    `layout` = '' OR
    `geolocation_key` = '' OR
    `doorbell_sound` = '' OR
    `plugnotas_api_key` = '' OR
    `plugnotas_cpfcnpj` = '' OR
    `plugnotas_taxes` = '' OR
    `delivery_settings` = '' OR
    `focusnfe_token` = '' OR
    `focusnfe_cnpj` = '' OR
    `totem_settings` = '' OR
    `notification_settings` = '' OR
    `seo_settings` = '' OR
    `home_page` = '' OR
    `lang` = '';

ALTER TABLE company
MODIFY COLUMN number smallint NULL,
MODIFY COLUMN receive_order_whatsapp tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN img_form tinyint NOT NULL DEFAULT 1,
MODIFY COLUMN switch_img_form_item tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_layer_fade tinyint NOT NULL DEFAULT 1,
MODIFY COLUMN switch_whatsapp_button tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_img_item tinyint NOT NULL DEFAULT 1,
MODIFY COLUMN switch_withdrawal tinyint NOT NULL DEFAULT 1,
MODIFY COLUMN switch_delivery tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_table tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_deliveryman_choose tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN deliveryman_choose_type tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_automatically_deliveryman_choose tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN automatically_deliveryman_choose_type tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_schedule_order tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_cashback tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN delivery_type tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN price_delivery_type tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN pix_type tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_multihub tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_stripe tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_asaas int NOT NULL DEFAULT 0,
MODIFY COLUMN closed tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_self_print tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_print_resume tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_print_group_items tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_automatically_accept tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_display_after_payment tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN type_automatically_accept tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN type_bill_show tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_free_shipping tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN show_report tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN hidden tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_pixel_facebook tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_automatically_apply_coupon tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_receive_orders_ifood tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_widget_ifood tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_charge_per_order tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN block_delete_orders tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_console tinyint NOT NULL DEFAULT 1,
MODIFY COLUMN show_item_hide_pdv tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_keep_store_open tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_pre_rate_waiter tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN pre_rate_waiter_type tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN header_hidden tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_plugnotas tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN switch_table_reservation tinyint NOT NULL DEFAULT 1,
MODIFY COLUMN switch_focusnfe tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN pre_rate_waiter_value decimal(10,2) NOT NULL DEFAULT 0.00,
MODIFY COLUMN console_amount_records smallint NOT NULL DEFAULT 10,
MODIFY COLUMN refresh_page_view_orders smallint NOT NULL DEFAULT 60,
MODIFY COLUMN free_shipping_above decimal(10,2) NOT NULL DEFAULT 0.00,
MODIFY COLUMN mp_expire date NOT NULL DEFAULT '2021-01-01',
MODIFY COLUMN max_radius_km int NOT NULL DEFAULT 10,
MODIFY COLUMN price_delivery decimal(10,2) NOT NULL DEFAULT 0.00,
MODIFY COLUMN price_delivery_km_type tinyint NOT NULL DEFAULT 0,
MODIFY COLUMN price_delivery_km decimal(10,2) NOT NULL DEFAULT 0.00,
MODIFY COLUMN price_delivery_km_min decimal(10,2) NOT NULL DEFAULT 0.00,
MODIFY COLUMN cashback_rate decimal(10,2) NOT NULL DEFAULT 0.00,
MODIFY COLUMN price_order_min decimal(10,2) NOT NULL DEFAULT 0.00,
MODIFY COLUMN table_reservation_interval time NULL DEFAULT '02:00:00',
MODIFY COLUMN focusnfe_icms_origem varchar(5) NULL DEFAULT '0',
MODIFY COLUMN focusnfe_icms_situacao_tributaria varchar(5) NULL DEFAULT '102',
MODIFY COLUMN home_page varchar(45) NULL DEFAULT 'report',
MODIFY COLUMN lang varchar(10) NULL DEFAULT 'pt_BR',
MODIFY COLUMN currency varchar(10) NULL DEFAULT 'pt-br',
MODIFY COLUMN country varchar(30) NULL DEFAULT 'br',
MODIFY COLUMN show_orders_amount smallint NOT NULL DEFAULT 10;

ALTER TABLE company
MODIFY COLUMN social_media VARCHAR(1000) NULL DEFAULT '{"facebook":{"switch":0,"profile":""},"instagram":{"switch":0,"profile":""},"twitter":{"switch":0,"profile":""}}',
MODIFY COLUMN message_api VARCHAR(1000) NULL DEFAULT '{"switch":"0","url":"","token":""}',
MODIFY COLUMN payment_method VARCHAR(1000) NULL DEFAULT '{"money":1,"card":0,"online":0,"online_methods":{"mp":0,"pix":0,"pagseguro":0}}',
MODIFY COLUMN hours VARCHAR(1800) NULL DEFAULT '[{"switch_sun":0,"sun_i":"00:00:00","sun_u":"00:00:00","switch_mon":0,"mon_i":"00:00","mon_u":"00:00","switch_tue":0,"tue_i":"00:00","tue_u":"00:00","switch_wed":0,"wed_i":"00:00:00","wed_u":"00:00:00","switch_thu":0,"thu_i":"00:00:00","thu_u":"00:00:00","switch_fri":0,"fri_i":"00:00","fri_u":"00:00","switch_sat":0,"sat_i":"00:00:00","sat_u":"00:00:00"},{"switch_sun":0,"sun_i":"00:00:00","sun_u":"00:00:00","switch_mon":0,"mon_i":"00:00","mon_u":"00:00","switch_tue":0,"tue_i":"00:00","tue_u":"00:00","switch_wed":0,"wed_i":"00:00:00","wed_u":"00:00:00","switch_thu":0,"thu_i":"00:00:00","thu_u":"00:00:00","switch_fri":0,"fri_i":"00:00","fri_u":"00:00","switch_sat":0,"sat_i":"00:00:00","sat_u":"00:00:00"},{"switch_sun":0,"sun_i":"00:00:00","sun_u":"00:00:00","switch_mon":0,"mon_i":"00:00","mon_u":"00:00","switch_tue":0,"tue_i":"00:00","tue_u":"00:00","switch_wed":0,"wed_i":"00:00:00","wed_u":"00:00:00","switch_thu":0,"thu_i":"00:00:00","thu_u":"00:00:00","switch_fri":0,"fri_i":"00:00","fri_u":"00:00","switch_sat":0,"sat_i":"00:00:00","sat_u":"00:00:00"}]',
MODIFY COLUMN template VARCHAR(4000) NULL DEFAULT '{"color_menu":"#212529","color_menu_text":"#ffffff","color_footer":"#000000","color_footer_text":"#ffffff","background_color":"#ececec"}';

ALTER TABLE `tables_reservations_group` ADD `max_period` INT NULL AFTER `img`;

ALTER TABLE `district` ADD `free_shipping` TINYINT NOT NULL DEFAULT '0' AFTER `show_pdv_only`, ADD `free_shipping_above` DECIMAL(10,2) NOT NULL DEFAULT '0' AFTER `free_shipping`;
ALTER TABLE `city` ADD `free_shipping` TINYINT NOT NULL DEFAULT '0' AFTER `show_pdv_only`, ADD `free_shipping_above` DECIMAL(10,2) NOT NULL DEFAULT '0' AFTER `free_shipping`;

CREATE INDEX idx_pix_txid ON orders(pix_txid);
CREATE INDEX idx_code ON orders(code);
CREATE INDEX idx_company_id ON orders(company_id);
CREATE INDEX idx_status ON orders(status);
CREATE INDEX idx_user_company_id ON orders(user_company_id);
CREATE INDEX idx_orders_source_date_id ON orders (source_type, date_created);
CREATE INDEX idx_user_client_phone_number ON orders(user_client_phone_number);
