DROP TABLE IF EXISTS `aowow_item_stats`;
CREATE TABLE `aowow_item_stats` (
    `type` smallint(5) unsigned NOT NULL,
    `typeId` mediumint(8) NOT NULL,
    `nsockets` tinyint(3) unsigned NOT NULL DEFAULT 0,
    `dps` float(8,2) NULL,
    `damagetype` tinyint(4) NULL,
    `dmgmin1` mediumint(5) unsigned NULL,
    `dmgmax1` mediumint(5) unsigned NULL,
    `speed` float(8,2) NULL,
    `mledps` float(8,2) NULL,
    `mledmgmin` mediumint(5) unsigned NULL,
    `mledmgmax` mediumint(5) unsigned NULL,
    `mlespeed` float(8,2) NULL,
    `rgddps` float(8,2) NULL,
    `rgddmgmin` mediumint(5) unsigned NULL,
    `rgddmgmax` mediumint(5) unsigned NULL,
    `rgdspeed` float(8,2) NULL,
    `dmg` float(8,2) NOT NULL DEFAULT 0,
    `mana` mediumint(6) NOT NULL DEFAULT 0,
    `health` mediumint(6) NOT NULL DEFAULT 0,
    `agi` mediumint(6) NOT NULL DEFAULT 0,
    `str` mediumint(6) NOT NULL DEFAULT 0,
    `int` mediumint(6) NOT NULL DEFAULT 0,
    `spi` mediumint(6) NOT NULL DEFAULT 0,
    `sta` mediumint(6) NOT NULL DEFAULT 0,
    `energy` mediumint(6) NOT NULL DEFAULT 0,
    `rage` mediumint(6) NOT NULL DEFAULT 0,
    `focus` mediumint(6) NOT NULL DEFAULT 0,
    `runic` mediumint(6) NOT NULL DEFAULT 0,
    `defrtng` mediumint(6) NOT NULL DEFAULT 0,
    `dodgertng` mediumint(6) NOT NULL DEFAULT 0,
    `parryrtng` mediumint(6) NOT NULL DEFAULT 0,
    `blockrtng` mediumint(6) NOT NULL DEFAULT 0,
    `mlehitrtng` mediumint(6) NOT NULL DEFAULT 0,
    `rgdhitrtng` mediumint(6) NOT NULL DEFAULT 0,
    `splhitrtng` mediumint(6) NOT NULL DEFAULT 0,
    `mlecritstrkrtng` mediumint(6) NOT NULL DEFAULT 0,
    `rgdcritstrkrtng` mediumint(6) NOT NULL DEFAULT 0,
    `splcritstrkrtng` mediumint(6) NOT NULL DEFAULT 0,
    `_mlehitrtng` mediumint(6) NOT NULL DEFAULT 0,
    `_rgdhitrtng` mediumint(6) NOT NULL DEFAULT 0,
    `_splhitrtng` mediumint(6) NOT NULL DEFAULT 0,
    `_mlecritstrkrtng` mediumint(6) NOT NULL DEFAULT 0,
    `_rgdcritstrkrtng` mediumint(6) NOT NULL DEFAULT 0,
    `_splcritstrkrtng` mediumint(6) NOT NULL DEFAULT 0,
    `mlehastertng` mediumint(6) NOT NULL DEFAULT 0,
    `rgdhastertng` mediumint(6) NOT NULL DEFAULT 0,
    `splhastertng` mediumint(6) NOT NULL DEFAULT 0,
    `hitrtng` mediumint(6) NOT NULL DEFAULT 0,
    `critstrkrtng` mediumint(6) NOT NULL DEFAULT 0,
    `_hitrtng` mediumint(6) NOT NULL DEFAULT 0,
    `_critstrkrtng` mediumint(6) NOT NULL DEFAULT 0,
    `resirtng` mediumint(6) NOT NULL DEFAULT 0,
    `hastertng` mediumint(6) NOT NULL DEFAULT 0,
    `exprtng` mediumint(6) NOT NULL DEFAULT 0,
    `atkpwr` mediumint(6) NOT NULL DEFAULT 0,
    `mleatkpwr` mediumint(6) NOT NULL DEFAULT 0,
    `rgdatkpwr` mediumint(6) NOT NULL DEFAULT 0,
    `feratkpwr` mediumint(6) NOT NULL DEFAULT 0,
    `splheal` mediumint(6) NOT NULL DEFAULT 0,
    `spldmg` mediumint(6) NOT NULL DEFAULT 0,
    `manargn` mediumint(6) NOT NULL DEFAULT 0,
    `armorpenrtng` mediumint(6) NOT NULL DEFAULT 0,
    `splpwr` mediumint(6) NOT NULL DEFAULT 0,
    `healthrgn` mediumint(6) NOT NULL DEFAULT 0,
    `splpen` mediumint(6) NOT NULL DEFAULT 0,
    `block` mediumint(6) NOT NULL DEFAULT 0,
    `mastrtng` mediumint(6) NOT NULL DEFAULT 0,
    `armor` mediumint(6) NOT NULL DEFAULT 0,
    `armorbonus` mediumint(6) NULL,
    `firres` mediumint(6) NOT NULL DEFAULT 0,
    `frores` mediumint(6) NOT NULL DEFAULT 0,
    `holres` mediumint(6) NOT NULL DEFAULT 0,
    `shares` mediumint(6) NOT NULL DEFAULT 0,
    `natres` mediumint(6) NOT NULL DEFAULT 0,
    `arcres` mediumint(6) NOT NULL DEFAULT 0,
    `firsplpwr` mediumint(6) NOT NULL DEFAULT 0,
    `frosplpwr` mediumint(6) NOT NULL DEFAULT 0,
    `holsplpwr` mediumint(6) NOT NULL DEFAULT 0,
    `shasplpwr` mediumint(6) NOT NULL DEFAULT 0,
    `natsplpwr` mediumint(6) NOT NULL DEFAULT 0,
    `arcsplpwr` mediumint(6) NOT NULL DEFAULT 0,
    PRIMARY KEY (`type`,`typeId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

UPDATE `aowow_dbversion` SET `sql` = CONCAT(IFNULL(`sql`, ''), ' stats');
