CREATE TABLE /*_*/aitoolbox_usage (
  `id` int UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
  `user_id` int UNSIGNED NOT NULL,
  `action` varchar(50) NOT NULL,
  `bot_id` varchar(50) NULL,
  `tokens` int UNSIGNED NOT NULL,
  `real_tokens` int UNSIGNED NOT NULL,
  `timestamp` bigint UNSIGNED NOT NULL,
  `success` tinyint NOT NULL,
  `error` text NOT NULL
) /*$wgDBTableOptions*/;

ALTER TABLE /*_*/aitoolbox_usage
  ADD KEY `user_id` (`user_id`),
  ADD KEY `bot_id` (`bot_id`),
  ADD KEY `timestamp` (`timestamp`),
  ADD KEY `success` (`success`),
  ADD KEY `action` (`action`),
  ADD KEY `real_tokens` (`real_tokens`);