ALTER TABLE webs_user CHANGE userID users_id {serial};
ALTER TABLE webs_user CHANGE registerdate users_register int(14) NOT NULL default '0';
ALTER TABLE webs_user CHANGE lastlogin users_laston int(14) NOT NULL default '0';
ALTER TABLE webs_user CHANGE username users_nick varchar(40) NOT NULL default '';
ALTER TABLE webs_user CHANGE password users_pwd varchar(40) NOT NULL default '';      -- Has to be MD5
ALTER TABLE webs_user DROP nickname;
ALTER TABLE webs_user CHANGE email users_email varchar(40) NOT NULL default '';
ALTER TABLE webs_user CHANGE firstname users_name varchar(80) NOT NULL default '';
ALTER TABLE webs_user CHANGE lastname users_surname varchar(80) NOT NULL default '';
ALTER TABLE webs_user CHANGE sex users_sex varchar(8) NOT NULL default '';
UPDATE webs_user SET users_sex = 'male' WHERE users_sex = 'm';
UPDATE webs_user SET users_sex = 'female' WHERE users_sex = 'f';
ALTER TABLE webs_user CHANGE country users_country varchar(8) NOT NULL default '';
ALTER TABLE webs_user CHANGE town users_place varchar(40) NOT NULL default '';
ALTER TABLE webs_user ADD users_age varchar(12) NOT NULL default '';
UPDATE webs_user SET users_age = DATE_FORMAT(birthday, '%Y-%m-%d');
ALTER TABLE webs_user DROP birthday;
ALTER TABLE webs_user CHANGE icq users_icq int(12) NOT NULL default '0';
ALTER TABLE webs_user CHANGE avatar users_avatar varchar(80) NOT NULL default '';     -- Do not forget to move the files aswell
ALTER TABLE webs_user CHANGE usertext users_signature text;
ALTER TABLE webs_user CHANGE userpic users_picture varchar(80) NOT NULL default '';   -- Do not forget to move the files aswell
ALTER TABLE webs_user DROP clantag;                                                   -- Computer data is saved differently in CSP so I just drop it
ALTER TABLE webs_user DROP clanname;
ALTER TABLE webs_user DROP clanhp;
ALTER TABLE webs_user DROP clanirc;
ALTER TABLE webs_user DROP clanhistory;
ALTER TABLE webs_user DROP cpu;
ALTER TABLE webs_user DROP mainboard;
ALTER TABLE webs_user DROP ram;
ALTER TABLE webs_user DROP monitor;
ALTER TABLE webs_user DROP graphiccard;
ALTER TABLE webs_user DROP soundcard;
ALTER TABLE webs_user DROP verbindung;
ALTER TABLE webs_user DROP keyboard;
ALTER TABLE webs_user DROP mouse;
ALTER TABLE webs_user DROP mousepad;
ALTER TABLE webs_user CHANGE newsletter users_newsletter int(2) NOT NULL default '0';
ALTER TABLE webs_user CHANGE homepage users_url varchar(80) NOT NULL default '';
ALTER TABLE webs_user CHANGE about users_info text;
ALTER TABLE webs_user DROP pmgot;
ALTER TABLE webs_user DROP pmsent;
ALTER TABLE webs_user DROP visits;
ALTER TABLE webs_user CHANGE banned users_delete int(2) NOT NULL default '0';
ALTER TABLE webs_user DROP ip;
ALTER TABLE webs_user DROP topics;
ALTER TABLE webs_user DROP articles;
ALTER TABLE webs_user DROP demos;
ALTER TABLE webs_user DROP files;
ALTER TABLE webs_user DROP gallery_pictures;
ALTER TABLE webs_user DROP mailonpm;
ALTER TABLE webs_user DROP userdescription;
ALTER TABLE webs_user CHANGE activated users_active int(2) NOT NULL default '0';

ALTER TABLE webs_user ADD access_id int(4) NOT NULL default '0';
UPDATE webs_user SET access_id = '2';
ALTER TABLE webs_user ADD users_height int(4) NOT NULL default '0';
ALTER TABLE webs_user ADD users_lang varchar(40) NOT NULL default '';
UPDATE webs_user SET users_lang = 'German';
ALTER TABLE webs_user ADD users_postalcode varchar(8) NOT NULL default '';
ALTER TABLE webs_user ADD users_adress varchar(80) NOT NULL default '';
ALTER TABLE webs_user ADD users_msn varchar(40) NOT NULL default '';
ALTER TABLE webs_user ADD users_skype varchar(40) NOT NULL default '';
ALTER TABLE webs_user ADD users_phone varchar(40) NOT NULL default '';
ALTER TABLE webs_user ADD users_mobile varchar(40) NOT NULL default '';
ALTER TABLE webs_user ADD users_limit int(4) NOT NULL default '20';
ALTER TABLE webs_user ADD users_view varchar(20) NOT NULL default '';
ALTER TABLE webs_user ADD users_timezone int(8) NOT NULL default '0';
ALTER TABLE webs_user ADD users_dstime varchar(10) NOT NULL default '';
ALTER TABLE webs_user ADD users_hidden text;
ALTER TABLE webs_user ADD users_regkey varchar(50) NOT NULL default '0';
ALTER TABLE webs_user ADD users_homelimit int(4) NOT NULL default '8';
ALTER TABLE webs_user ADD users_readtime int(14) NOT NULL default '1209600';
ALTER TABLE webs_user ADD users_tpl varchar(80) NOT NULL default '';
ALTER TABLE webs_user ADD users_invisible int(2) NOT NULL default '0';
ALTER TABLE webs_user ADD users_ajax int(2) NOT NULL default '0';

RENAME TABLE {pre}_users TO {pre}_users_backup;
RENAME TABLE webs_user TO {pre}_users;

ALTER TABLE {pre}_users ADD UNIQUE (users_nick);