ALTER TABLE users MODIFY password VARCHAR(40);
ALTER TABLE loginsessions RENAME TO sessions, ADD COLUMN data TEXT NOT NULL AFTER expires, CHANGE COLUMN sessid id CHAR(72) NOT NULL DEFAULT '' FIRST, MODIFY expires INT UNSIGNED;
ALTER TABLE forums CHANGE lastpost lastpostid INT UNSIGNED;
ALTER TABLE threads CHANGE firstpost firstpostid INT UNSIGNED NOT NULL DEFAULT 0, CHANGE lastpost lastpostid INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE posts CHANGE COLUMN lastedit lasteditid INT UNSIGNED NOT NULL DEFAULT 0;

CREATE TABLE usergroups (userid INT UNSIGNED NOT NULL, groupid TINYINT UNSIGNED NOT NULL, priority TINYINT UNSIGNED NOT NULL, PRIMARY KEY (userid, groupid, priority), INDEX (userid), INDEX (groupid));
CREATE TABLE groups (id INT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE, icon TINYTEXT NOT NULL DEFAULT '', name TINYTEXT NOT NULL);
CREATE TABLE grouppermissions (groupid INT UNSIGNED NOT NULL, permission VARCHAR(64) NOT NULL DEFAULT '', scope VARCHAR(64) NOT NULL DEFAULT '', polarity ENUM('allow','deny'), PRIMARY KEY (groupid, permission, scope));


UPDATE pokemon SET newid=0 WHERE newid > 202
ALTER TABLE pokemon CHANGE COLUMN newid id_hoenn TINYINT(3) UNSIGNED NULL, CHANGE COLUMN japname name_romaji VARCHAR(16), CHANGE COLUMN japkana name_jp TINYBLOB NOT NULL AFTER name, ADD COLUMN id_johto TINYINT(3) UNSIGNED NULL AFTER id
UPDATE pokemon SET id_hoenn=NULL WHERE id_hoenn = 0
ALTER TABLE moves MODIFY combos VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE pokemon ADD COLUMN evparam VARCHAR(32) NOT NULL AFTER evid, ADD COLUMN evmethod ENUM('item','level','happiness','trade','unique-happydayoritem','unique-happynightoritem','unique-divineintervention','unique-levelplusattack','unique-levelplusdefense','unique-levelplusequal','unique-beauty') NULL AFTER evid, ADD COLUMN evparent SMALLINT(3) NOT NULL AFTER evid


UPDATE pokemon SET id_johto=001 WHERE name='Chikorita';
UPDATE pokemon SET id_johto=002 WHERE name='Bayleef';
UPDATE pokemon SET id_johto=003 WHERE name='Meganium';
UPDATE pokemon SET id_johto=004 WHERE name='Cyndaquil';
UPDATE pokemon SET id_johto=005 WHERE name='Quilava';
UPDATE pokemon SET id_johto=006 WHERE name='Typhlosion';
UPDATE pokemon SET id_johto=007 WHERE name='Totodile';
UPDATE pokemon SET id_johto=008 WHERE name='Croconaw';
UPDATE pokemon SET id_johto=009 WHERE name='Feraligatr';
UPDATE pokemon SET id_johto=010 WHERE name='Pidgey';
UPDATE pokemon SET id_johto=011 WHERE name='Pidgeotto';
UPDATE pokemon SET id_johto=012 WHERE name='Pidgeot';
UPDATE pokemon SET id_johto=013 WHERE name='Spearow';
UPDATE pokemon SET id_johto=014 WHERE name='Fearow';
UPDATE pokemon SET id_johto=015 WHERE name='Hoothoot';
UPDATE pokemon SET id_johto=016 WHERE name='Noctowl';
UPDATE pokemon SET id_johto=017 WHERE name='Rattata';
UPDATE pokemon SET id_johto=018 WHERE name='Raticate';
UPDATE pokemon SET id_johto=019 WHERE name='Sentret';
UPDATE pokemon SET id_johto=020 WHERE name='Furret';
UPDATE pokemon SET id_johto=021 WHERE name='Pichu';
UPDATE pokemon SET id_johto=022 WHERE name='Pikachu';
UPDATE pokemon SET id_johto=023 WHERE name='Raichu';
UPDATE pokemon SET id_johto=024 WHERE name='Caterpie';
UPDATE pokemon SET id_johto=025 WHERE name='Metapod';
UPDATE pokemon SET id_johto=026 WHERE name='Butterfree';
UPDATE pokemon SET id_johto=027 WHERE name='Weedle';
UPDATE pokemon SET id_johto=028 WHERE name='Kakuna';
UPDATE pokemon SET id_johto=029 WHERE name='Beedrill';
UPDATE pokemon SET id_johto=030 WHERE name='Ledyba';
UPDATE pokemon SET id_johto=031 WHERE name='Ledian';
UPDATE pokemon SET id_johto=032 WHERE name='Spinarak';
UPDATE pokemon SET id_johto=033 WHERE name='Ariados';
UPDATE pokemon SET id_johto=034 WHERE name='Geodude';
UPDATE pokemon SET id_johto=035 WHERE name='Graveler';
UPDATE pokemon SET id_johto=036 WHERE name='Golem';
UPDATE pokemon SET id_johto=037 WHERE name='Zubat';
UPDATE pokemon SET id_johto=038 WHERE name='Golbat';
UPDATE pokemon SET id_johto=039 WHERE name='Crobat';
UPDATE pokemon SET id_johto=040 WHERE name='Cleffa';
UPDATE pokemon SET id_johto=041 WHERE name='Clefairy';
UPDATE pokemon SET id_johto=042 WHERE name='Clefable';
UPDATE pokemon SET id_johto=043 WHERE name='Igglybuff';
UPDATE pokemon SET id_johto=044 WHERE name='Jigglypuff';
UPDATE pokemon SET id_johto=045 WHERE name='Wigglytuff';
UPDATE pokemon SET id_johto=046 WHERE name='Togepi';
UPDATE pokemon SET id_johto=047 WHERE name='Togetic';
UPDATE pokemon SET id_johto=048 WHERE name='Sandshrew';
UPDATE pokemon SET id_johto=049 WHERE name='Sandslash';
UPDATE pokemon SET id_johto=050 WHERE name='Ekans';
UPDATE pokemon SET id_johto=051 WHERE name='Arbok';
UPDATE pokemon SET id_johto=052 WHERE name='Dunsparce';
UPDATE pokemon SET id_johto=053 WHERE name='Mareep';
UPDATE pokemon SET id_johto=054 WHERE name='Flaaffy';
UPDATE pokemon SET id_johto=055 WHERE name='Ampharos';
UPDATE pokemon SET id_johto=056 WHERE name='Wooper';
UPDATE pokemon SET id_johto=057 WHERE name='Quagsire';
UPDATE pokemon SET id_johto=058 WHERE name='Gastly';
UPDATE pokemon SET id_johto=059 WHERE name='Haunter';
UPDATE pokemon SET id_johto=060 WHERE name='Gengar';
UPDATE pokemon SET id_johto=061 WHERE name='Unown';
UPDATE pokemon SET id_johto=062 WHERE name='Onix';
UPDATE pokemon SET id_johto=063 WHERE name='Steelix';
UPDATE pokemon SET id_johto=064 WHERE name='Bellsprout';
UPDATE pokemon SET id_johto=065 WHERE name='Weepinbell';
UPDATE pokemon SET id_johto=066 WHERE name='Victreebel';
UPDATE pokemon SET id_johto=067 WHERE name='Hoppip';
UPDATE pokemon SET id_johto=068 WHERE name='Skiploom';
UPDATE pokemon SET id_johto=069 WHERE name='Jumpluff';
UPDATE pokemon SET id_johto=070 WHERE name='Paras';
UPDATE pokemon SET id_johto=071 WHERE name='Parasect';
UPDATE pokemon SET id_johto=072 WHERE name='Poliwag';
UPDATE pokemon SET id_johto=073 WHERE name='Poliwhirl';
UPDATE pokemon SET id_johto=074 WHERE name='Poliwrath';
UPDATE pokemon SET id_johto=075 WHERE name='Politoed';
UPDATE pokemon SET id_johto=076 WHERE name='Magikarp';
UPDATE pokemon SET id_johto=077 WHERE name='Gyarados';
UPDATE pokemon SET id_johto=078 WHERE name='Goldeen';
UPDATE pokemon SET id_johto=079 WHERE name='Seaking';
UPDATE pokemon SET id_johto=080 WHERE name='Slowpoke';
UPDATE pokemon SET id_johto=081 WHERE name='Slowbro';
UPDATE pokemon SET id_johto=082 WHERE name='Slowking';
UPDATE pokemon SET id_johto=083 WHERE name='Oddish';
UPDATE pokemon SET id_johto=084 WHERE name='Gloom';
UPDATE pokemon SET id_johto=085 WHERE name='Vileplume';
UPDATE pokemon SET id_johto=086 WHERE name='Bellossom';
UPDATE pokemon SET id_johto=087 WHERE name='Drowzee';
UPDATE pokemon SET id_johto=088 WHERE name='Hypno';
UPDATE pokemon SET id_johto=089 WHERE name='Abra';
UPDATE pokemon SET id_johto=090 WHERE name='Kadabra';
UPDATE pokemon SET id_johto=091 WHERE name='Alakazam';
UPDATE pokemon SET id_johto=092 WHERE name='Ditto';
UPDATE pokemon SET id_johto=093 WHERE name='Pineco';
UPDATE pokemon SET id_johto=094 WHERE name='Forretress';
UPDATE pokemon SET id_johto=095 WHERE name='Nidoran F';
UPDATE pokemon SET id_johto=096 WHERE name='Nidorina';
UPDATE pokemon SET id_johto=097 WHERE name='Nidoqueen';
UPDATE pokemon SET id_johto=098 WHERE name='Nidoran M';
UPDATE pokemon SET id_johto=099 WHERE name='Nidorino';
UPDATE pokemon SET id_johto=100 WHERE name='Nidoking';
UPDATE pokemon SET id_johto=101 WHERE name='Yanma';
UPDATE pokemon SET id_johto=102 WHERE name='Sunkern';
UPDATE pokemon SET id_johto=103 WHERE name='Sunflora';
UPDATE pokemon SET id_johto=104 WHERE name='Exeggcute';
UPDATE pokemon SET id_johto=105 WHERE name='Exeggutor';
UPDATE pokemon SET id_johto=106 WHERE name='Sudowoodo';
UPDATE pokemon SET id_johto=107 WHERE name='Wobbuffet';
UPDATE pokemon SET id_johto=108 WHERE name='Venonat';
UPDATE pokemon SET id_johto=109 WHERE name='Venomoth';
UPDATE pokemon SET id_johto=110 WHERE name='Scyther';
UPDATE pokemon SET id_johto=111 WHERE name='Scizor';
UPDATE pokemon SET id_johto=112 WHERE name='Pinsir';
UPDATE pokemon SET id_johto=113 WHERE name='Heracross';
UPDATE pokemon SET id_johto=114 WHERE name='Koffing';
UPDATE pokemon SET id_johto=115 WHERE name='Weezing';
UPDATE pokemon SET id_johto=116 WHERE name='Grimer';
UPDATE pokemon SET id_johto=117 WHERE name='Muk';
UPDATE pokemon SET id_johto=118 WHERE name='Magnemite';
UPDATE pokemon SET id_johto=119 WHERE name='Magneton';
UPDATE pokemon SET id_johto=120 WHERE name='Voltorb';
UPDATE pokemon SET id_johto=121 WHERE name='Electrode';
UPDATE pokemon SET id_johto=122 WHERE name='Aipom';
UPDATE pokemon SET id_johto=123 WHERE name='Snubbull';
UPDATE pokemon SET id_johto=124 WHERE name='Granbull';
UPDATE pokemon SET id_johto=125 WHERE name='Vulpix';
UPDATE pokemon SET id_johto=126 WHERE name='Ninetales';
UPDATE pokemon SET id_johto=127 WHERE name='Growlithe';
UPDATE pokemon SET id_johto=128 WHERE name='Arcanine';
UPDATE pokemon SET id_johto=129 WHERE name='Stantler';
UPDATE pokemon SET id_johto=130 WHERE name='Marill';
UPDATE pokemon SET id_johto=131 WHERE name='Azumarill';
UPDATE pokemon SET id_johto=132 WHERE name='Diglett';
UPDATE pokemon SET id_johto=133 WHERE name='Dugtrio';
UPDATE pokemon SET id_johto=134 WHERE name='Mankey';
UPDATE pokemon SET id_johto=135 WHERE name='Primeape';
UPDATE pokemon SET id_johto=136 WHERE name='Meowth';
UPDATE pokemon SET id_johto=137 WHERE name='Persian';
UPDATE pokemon SET id_johto=138 WHERE name='Psyduck';
UPDATE pokemon SET id_johto=139 WHERE name='Golduck';
UPDATE pokemon SET id_johto=140 WHERE name='Machop';
UPDATE pokemon SET id_johto=141 WHERE name='Machoke';
UPDATE pokemon SET id_johto=142 WHERE name='Machamp';
UPDATE pokemon SET id_johto=143 WHERE name='Tyrogue';
UPDATE pokemon SET id_johto=144 WHERE name='Hitmonlee';
UPDATE pokemon SET id_johto=145 WHERE name='Hitmonchan';
UPDATE pokemon SET id_johto=146 WHERE name='Hitmontop';
UPDATE pokemon SET id_johto=147 WHERE name='Girafarig';
UPDATE pokemon SET id_johto=148 WHERE name='Tauros';
UPDATE pokemon SET id_johto=149 WHERE name='Miltank';
UPDATE pokemon SET id_johto=150 WHERE name='Magby';
UPDATE pokemon SET id_johto=151 WHERE name='Magmar';
UPDATE pokemon SET id_johto=152 WHERE name='Smoochum';
UPDATE pokemon SET id_johto=153 WHERE name='Jynx';
UPDATE pokemon SET id_johto=154 WHERE name='Elekid';
UPDATE pokemon SET id_johto=155 WHERE name='Electabuzz';
UPDATE pokemon SET id_johto=156 WHERE name='Mr. Mime';
UPDATE pokemon SET id_johto=157 WHERE name='Smeargle';
UPDATE pokemon SET id_johto=158 WHERE name='Farfetch\'d';
UPDATE pokemon SET id_johto=159 WHERE name='Natu';
UPDATE pokemon SET id_johto=160 WHERE name='Xatu';
UPDATE pokemon SET id_johto=161 WHERE name='Qwilfish';
UPDATE pokemon SET id_johto=162 WHERE name='Tentacool';
UPDATE pokemon SET id_johto=163 WHERE name='Tentacruel';
UPDATE pokemon SET id_johto=164 WHERE name='Krabby';
UPDATE pokemon SET id_johto=165 WHERE name='Kingler';
UPDATE pokemon SET id_johto=166 WHERE name='Shuckle';
UPDATE pokemon SET id_johto=167 WHERE name='Staryu';
UPDATE pokemon SET id_johto=168 WHERE name='Starmie';
UPDATE pokemon SET id_johto=169 WHERE name='Shellder';
UPDATE pokemon SET id_johto=170 WHERE name='Cloyster';
UPDATE pokemon SET id_johto=171 WHERE name='Corsola';
UPDATE pokemon SET id_johto=172 WHERE name='Remoraid';
UPDATE pokemon SET id_johto=173 WHERE name='Octillery';
UPDATE pokemon SET id_johto=174 WHERE name='Chinchou';
UPDATE pokemon SET id_johto=175 WHERE name='Lanturn';
UPDATE pokemon SET id_johto=176 WHERE name='Seel';
UPDATE pokemon SET id_johto=177 WHERE name='Dewgong';
UPDATE pokemon SET id_johto=178 WHERE name='Lickitung';
UPDATE pokemon SET id_johto=179 WHERE name='Tangela';
UPDATE pokemon SET id_johto=180 WHERE name='Eevee';
UPDATE pokemon SET id_johto=181 WHERE name='Vaporeon';
UPDATE pokemon SET id_johto=182 WHERE name='Jolteon';
UPDATE pokemon SET id_johto=183 WHERE name='Flareon';
UPDATE pokemon SET id_johto=184 WHERE name='Espeon';
UPDATE pokemon SET id_johto=185 WHERE name='Umbreon';
UPDATE pokemon SET id_johto=186 WHERE name='Horsea';
UPDATE pokemon SET id_johto=187 WHERE name='Seadra';
UPDATE pokemon SET id_johto=188 WHERE name='Kingdra';
UPDATE pokemon SET id_johto=189 WHERE name='Gligar';
UPDATE pokemon SET id_johto=190 WHERE name='Delibird';
UPDATE pokemon SET id_johto=191 WHERE name='Swinub';
UPDATE pokemon SET id_johto=192 WHERE name='Piloswine';
UPDATE pokemon SET id_johto=193 WHERE name='Teddiursa';
UPDATE pokemon SET id_johto=194 WHERE name='Ursaring';
UPDATE pokemon SET id_johto=195 WHERE name='Phanpy';
UPDATE pokemon SET id_johto=196 WHERE name='Donphan';
UPDATE pokemon SET id_johto=197 WHERE name='Mantine';
UPDATE pokemon SET id_johto=198 WHERE name='Skarmory';
UPDATE pokemon SET id_johto=199 WHERE name='Doduo';
UPDATE pokemon SET id_johto=200 WHERE name='Dodrio';
UPDATE pokemon SET id_johto=201 WHERE name='Ponyta';
UPDATE pokemon SET id_johto=202 WHERE name='Rapidash';
UPDATE pokemon SET id_johto=203 WHERE name='Cubone';
UPDATE pokemon SET id_johto=204 WHERE name='Marowak';
UPDATE pokemon SET id_johto=205 WHERE name='Kangaskhan';
UPDATE pokemon SET id_johto=206 WHERE name='Rhyhorn';
UPDATE pokemon SET id_johto=207 WHERE name='Rhydon';
UPDATE pokemon SET id_johto=208 WHERE name='Murkrow';
UPDATE pokemon SET id_johto=209 WHERE name='Houndour';
UPDATE pokemon SET id_johto=210 WHERE name='Houndoom';
UPDATE pokemon SET id_johto=211 WHERE name='Slugma';
UPDATE pokemon SET id_johto=212 WHERE name='Magcargo';
UPDATE pokemon SET id_johto=213 WHERE name='Sneasel';
UPDATE pokemon SET id_johto=214 WHERE name='Misdreavus';
UPDATE pokemon SET id_johto=215 WHERE name='Porygon';
UPDATE pokemon SET id_johto=216 WHERE name='Porygon2';
UPDATE pokemon SET id_johto=217 WHERE name='Chansey';
UPDATE pokemon SET id_johto=218 WHERE name='Blissey';
UPDATE pokemon SET id_johto=219 WHERE name='Lapras';
UPDATE pokemon SET id_johto=220 WHERE name='Omanyte';
UPDATE pokemon SET id_johto=221 WHERE name='Omastar';
UPDATE pokemon SET id_johto=222 WHERE name='Kabuto';
UPDATE pokemon SET id_johto=223 WHERE name='Kabutops';
UPDATE pokemon SET id_johto=224 WHERE name='Aerodactyl';
UPDATE pokemon SET id_johto=225 WHERE name='Snorlax';
UPDATE pokemon SET id_johto=226 WHERE name='Bulbasaur';
UPDATE pokemon SET id_johto=227 WHERE name='Ivysaur';
UPDATE pokemon SET id_johto=228 WHERE name='Venusaur';
UPDATE pokemon SET id_johto=229 WHERE name='Charmander';
UPDATE pokemon SET id_johto=230 WHERE name='Charmeleon';
UPDATE pokemon SET id_johto=231 WHERE name='Charizard';
UPDATE pokemon SET id_johto=232 WHERE name='Squirtle';
UPDATE pokemon SET id_johto=233 WHERE name='Wartortle';
UPDATE pokemon SET id_johto=234 WHERE name='Blastoise';
UPDATE pokemon SET id_johto=235 WHERE name='Articuno';
UPDATE pokemon SET id_johto=236 WHERE name='Zapdos';
UPDATE pokemon SET id_johto=237 WHERE name='Moltres';
UPDATE pokemon SET id_johto=238 WHERE name='Raikou';
UPDATE pokemon SET id_johto=239 WHERE name='Entei';
UPDATE pokemon SET id_johto=240 WHERE name='Suicune';
UPDATE pokemon SET id_johto=241 WHERE name='Dratini';
UPDATE pokemon SET id_johto=242 WHERE name='Dragonair';
UPDATE pokemon SET id_johto=243 WHERE name='Dragonite';
UPDATE pokemon SET id_johto=244 WHERE name='Larvitar';
UPDATE pokemon SET id_johto=245 WHERE name='Pupitar';
UPDATE pokemon SET id_johto=246 WHERE name='Tyranitar';
UPDATE pokemon SET id_johto=247 WHERE name='Lugia';
UPDATE pokemon SET id_johto=248 WHERE name='Ho-Oh';
UPDATE pokemon SET id_johto=249 WHERE name='Mewtwo';
UPDATE pokemon SET id_johto=250 WHERE name='Mew';
UPDATE pokemon SET id_johto=251 WHERE name='Celebi';
