CREATE TABLE IF NOT EXISTS `clan_data` (
  `clan_id` INT NOT NULL DEFAULT 0,
  `clan_name` varchar(45) ,
  `clan_level` INT,
  `reputation_score` INT NOT NULL DEFAULT 0,
  `hasCastle` INT,
  `blood_alliance_count` smallint(5) unsigned NOT NULL DEFAULT 0,
  `blood_oath_count` smallint(5) unsigned NOT NULL DEFAULT 0,
  `ally_id` INT,
  `ally_name` varchar(45),
  `leader_id` INT,
  `crest_id` INT,
  `crest_large_id` INT,
  `ally_crest_id` INT,
  `auction_bid_at` INT NOT NULL DEFAULT 0,
  `ally_penalty_expiry_time` bigint(13) unsigned NOT NULL DEFAULT '0',
  `ally_penalty_type` tinyint(1) NOT NULL DEFAULT 0,
  `char_penalty_expiry_time` bigint(13) unsigned NOT NULL DEFAULT '0',
  `dissolving_expiry_time` bigint(13) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`clan_id`),
  KEY `ally_id` (`ally_id`),
  KEY `leader_id` (`leader_id`),
  KEY `auction_bid_at` (`auction_bid_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;