BEGIN;
ALTER TABLE `user_auth`
  MODIFY COLUMN `user_id` CHAR(36) NOT NULL;
ALTER TABLE `query_cleanup_detail`
  MODIFY COLUMN `cleanup_log_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `query_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `order_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `user_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `product_id` CHAR(36) NOT NULL;
ALTER TABLE `query`
  MODIFY COLUMN `order_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `user_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `product_id` CHAR(36) NOT NULL;
ALTER TABLE `product_feature`
  MODIFY COLUMN `product_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `feature_id` CHAR(36) NOT NULL;
ALTER TABLE `order_refund`
  MODIFY COLUMN `order_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `user_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `product_id` CHAR(36) NOT NULL;
ALTER TABLE `order`
  MODIFY COLUMN `user_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `product_id` CHAR(36) NOT NULL;
ALTER TABLE `example`
  MODIFY COLUMN `feature_id` CHAR(36) NOT NULL;
ALTER TABLE `authorization_document`
  MODIFY COLUMN `user_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `order_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `query_id` CHAR(36) NOT NULL;
ALTER TABLE `agent_withdrawal_tax`
  MODIFY COLUMN `agent_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `withdrawal_id` CHAR(36) NOT NULL;
ALTER TABLE `agent_withdrawal`
  MODIFY COLUMN `agent_id` CHAR(36) NOT NULL;
ALTER TABLE `agent_wallet`
  MODIFY COLUMN `agent_id` CHAR(36) NOT NULL;
ALTER TABLE `agent_upgrade`
  MODIFY COLUMN `agent_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `rebate_agent_id` CHAR(36) NULL,
  MODIFY COLUMN `operator_agent_id` CHAR(36) NULL;
ALTER TABLE `agent_short_link`
  MODIFY COLUMN `link_id` CHAR(36) NULL,
  MODIFY COLUMN `invite_code_id` CHAR(36) NULL;
ALTER TABLE `agent_relation`
  MODIFY COLUMN `parent_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `child_id` CHAR(36) NOT NULL;
ALTER TABLE `agent_rebate`
  MODIFY COLUMN `agent_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `source_agent_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `order_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `product_id` CHAR(36) NOT NULL;
ALTER TABLE `agent_real_name`
  MODIFY COLUMN `agent_id` CHAR(36) NOT NULL;
ALTER TABLE `agent_product_config`
  MODIFY COLUMN `product_id` CHAR(36) NOT NULL;
ALTER TABLE `agent_order`
  MODIFY COLUMN `agent_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `order_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `product_id` CHAR(36) NOT NULL;
ALTER TABLE `agent_link`
  MODIFY COLUMN `agent_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `user_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `product_id` CHAR(36) NOT NULL;
ALTER TABLE `agent_invite_code_usage`
  MODIFY COLUMN `invite_code_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `user_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `agent_id` CHAR(36) NOT NULL;
ALTER TABLE `agent_invite_code`
  MODIFY COLUMN `agent_id` CHAR(36) NULL,
  MODIFY COLUMN `used_user_id` CHAR(36) NULL,
  MODIFY COLUMN `used_agent_id` CHAR(36) NULL;
ALTER TABLE `agent_freeze_task`
  MODIFY COLUMN `agent_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `order_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `commission_id` CHAR(36) NOT NULL;
ALTER TABLE `agent_commission`
  MODIFY COLUMN `agent_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `order_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `product_id` CHAR(36) NOT NULL;
ALTER TABLE `agent`
  MODIFY COLUMN `user_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `team_leader_id` CHAR(36) NULL,
  MODIFY COLUMN `invite_code_id` CHAR(36) NULL;
ALTER TABLE `admin_user_role`
  MODIFY COLUMN `user_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `role_id` CHAR(36) NOT NULL;
ALTER TABLE `admin_role_menu`
  MODIFY COLUMN `role_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `menu_id` CHAR(36) NOT NULL;
ALTER TABLE `admin_role_api`
  MODIFY COLUMN `role_id` CHAR(36) NOT NULL,
  MODIFY COLUMN `api_id` CHAR(36) NOT NULL;
COMMIT;
