-- +migrate Up
ALTER TABLE `accounts` ADD INDEX `idx_accounts_tier` (tier);
ALTER TABLE `accounts` ADD INDEX `idx_accounts_parent_account_id` (parent_account_id);
ALTER TABLE `users` ADD INDEX `idx_users_external_id` (external_id);
ALTER TABLE `users` ADD INDEX `idx_users_email_verified` (email_verified);
ALTER TABLE `licenses` ADD INDEX `idx_licenses_order_id` (order_id);
ALTER TABLE `licenses` ADD INDEX `idx_licenses_status` (status);
ALTER TABLE `template_files` ADD INDEX `idx_template_files_account_id` (account_id);
ALTER TABLE `template_files` ADD INDEX `idx_template_files_file_name` (file_name(500));

-- +migrate Down
ALTER TABLE `accounts` DROP INDEX `idx_accounts_tier`;
ALTER TABLE `accounts` DROP INDEX `idx_accounts_parent_account_id`;
ALTER TABLE `users` DROP INDEX `idx_users_external_id`;
ALTER TABLE `users` DROP INDEX `idx_users_email_verified`;
ALTER TABLE `licenses` DROP INDEX `idx_licenses_order_id`;
ALTER TABLE `licenses` DROP INDEX `idx_licenses_status`;
ALTER TABLE `template_files` DROP INDEX `idx_template_files_account_id`;
ALTER TABLE `template_files` DROP INDEX `idx_template_files_file_name`;