BEGIN TRANSACTION;
CREATE TABLE `bans_new` (
  `ban_id` int(11) NOT NULL,
  `server_id` int(10) unsigned DEFAULT NULL,
  `ban_ip` varchar(255) DEFAULT NULL,
  `ban_name` varchar(2048) DEFAULT NULL,
  `ban_uid` varchar(255) DEFAULT NULL,
  `ban_timestamp` int(10) unsigned DEFAULT NULL,
  `ban_length` int(10) unsigned DEFAULT NULL,
  `ban_invoker_client_id` int(10) unsigned DEFAULT NULL,
  `ban_invoker_uid` varchar(64) DEFAULT NULL,
  `ban_invoker_name` varchar(255) DEFAULT NULL,
  `ban_reason` varchar(255) DEFAULT NULL,
  `ban_enforcements` int(10) unsigned DEFAULT 0,
  `ban_hash` varchar(255) DEFAULT NULL,
  `ban_mytsid` varchar(44) DEFAULT NULL,
  `ban_lastnickname` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`ban_id`)
);
INSERT INTO `bans_new` (
  `ban_id`, `server_id`, `ban_ip`, `ban_name`, `ban_uid`, `ban_timestamp`, `ban_length`,
  `ban_invoker_client_id`, `ban_invoker_uid`, `ban_invoker_name`, `ban_reason`, 
  `ban_enforcements`, `ban_hash`, `ban_mytsid`, `ban_lastnickname`
)
SELECT 
  `ban_id`, `server_id`, `ban_ip`, `ban_name`, `ban_uid`, `ban_timestamp`, `ban_length`,
  `ban_invoker_client_id`, `ban_invoker_uid`, `ban_invoker_name`, `ban_reason`, 
  `ban_enforcements`, `ban_hash`, `ban_mytsid`, `ban_lastnickname`
FROM `bans`;
DROP TABLE `bans`;
ALTER TABLE `bans_new` RENAME TO `bans`;
COMMIT;
