-- Run in phpMyAdmin or: mysql -u USER -p DATABASE < scripts/add_admin_list_indexes.sql

ALTER TABLE `accounts` ADD INDEX `idx_accounts_created_at` (`created_at`);
ALTER TABLE `accounts` ADD INDEX `idx_accounts_booking_id` (`booking_id`);
ALTER TABLE `accounts` ADD INDEX `idx_accounts_system_user_created` (`system_user_id`, `created_at`);

ALTER TABLE `payagents` ADD INDEX `idx_payagents_created_at` (`created_at`);
ALTER TABLE `payagents` ADD INDEX `idx_payagents_company_created` (`company_id`, `created_at`);
ALTER TABLE `payagents` ADD INDEX `idx_payagents_agent_created` (`agent_id`, `created_at`);

ALTER TABLE `tickets` ADD INDEX `idx_tickets_active_list` (`cancel_status`, `refund`, `deleted_at`, `id`);
ALTER TABLE `tickets` ADD INDEX `idx_tickets_journeydata` (`journeydata`);
ALTER TABLE `tickets` ADD INDEX `idx_tickets_bookby_user` (`bookby_user_id`);
