text: -- Modifications à apporter à la table 'stats'
  ALTER TABLE CB_TABLE_PREFIXstats CHANGE st_value st_value MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  
  -- Modifications à apporter à la table 'messagesread'
  ALTER TABLE CB_TABLE_PREFIXmessagesread ADD lastmess MEDIUMINT UNSIGNED NOT NULL AFTER topic;
  UPDATE CB_TABLE_PREFIXmessagesread m LEFT JOIN CB_TABLE_PREFIXtopics t ON t.topic_id=m.topic SET m.lastmess=t.topic_lastmessage;
  ALTER TABLE CB_TABLE_PREFIXmessagesread ADD UNIQUE (topic);
  ALTER TABLE CB_TABLE_PREFIXmessagesread CHANGE topicgroup topicgroup MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXmessagesread CHANGE topic topic MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  
  -- Modifications à apporter à la table 'messages'
  ALTER TABLE CB_TABLE_PREFIXmessages ADD msg_userip INT NOT NULL AFTER msg_userid;
  ALTER TABLE CB_TABLE_PREFIXmessages CHANGE msg_id msg_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT;
  ALTER TABLE CB_TABLE_PREFIXmessages CHANGE msg_topicid msg_topicid MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXmessages CHANGE msg_userid msg_userid MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXmessages CHANGE msg_timestamp msg_timestamp INT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXmessages CHANGE msg_modified msg_modified INT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXmessages CHANGE msg_modifieduser msg_modifieduser MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  
  -- Modifications à apporter à la table 'topics'
  ALTER TABLE CB_TABLE_PREFIXtopics CHANGE topic_id topic_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT;
  ALTER TABLE CB_TABLE_PREFIXtopics CHANGE topic_starter topic_starter MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXtopics CHANGE topic_views topic_views MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXtopics CHANGE topic_type topic_type TINYINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXtopics CHANGE topic_status topic_status TINYINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXtopics CHANGE topic_fromtopicgroup topic_fromtopicgroup MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXtopics CHANGE topic_lastmessage topic_lastmessage MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXtopics CHANGE topic_nbreply topic_nbreply MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXtopics CHANGE topic_displaced topic_displaced MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  
  -- Modifications à apporter à la table 'topicgroups'
  ALTER TABLE CB_TABLE_PREFIXtopicgroups ADD tg_fromtopicgroup MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL AFTER tg_fromforum;
  ALTER TABLE CB_TABLE_PREFIXtopicgroups ADD INDEX ( tg_fromforum );
  ALTER TABLE CB_TABLE_PREFIXtopicgroups ADD INDEX ( tg_fromtopicgroup );
  ALTER TABLE CB_TABLE_PREFIXtopicgroups CHANGE tg_id tg_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT;
  ALTER TABLE CB_TABLE_PREFIXtopicgroups CHANGE tg_fromforum tg_fromforum MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXtopicgroups CHANGE tg_visibility tg_visibility TINYINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXtopicgroups CHANGE tg_order tg_order SMALLINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXtopicgroups CHANGE tg_lasttopic tg_lasttopic MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXtopicgroups CHANGE tg_nbtopics tg_nbtopics MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXtopicgroups CHANGE tg_nbmess tg_nbmess MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  
  -- Modifications à apporter à la table 'connected'
  ALTER TABLE CB_TABLE_PREFIXconnected DROP con_forum ,DROP con_topicgroup ,DROP con_topic;
  ALTER TABLE CB_TABLE_PREFIXconnected ADD con_position VARCHAR( 127 ) NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXconnected CHANGE con_id con_id INT UNSIGNED DEFAULT '0' NOT NULL;
  
  -- Modifications à apporter à la table 'users'
  ALTER TABLE CB_TABLE_PREFIXusers ADD usr_changepass VARCHAR( 32 ) NOT NULL AFTER usr_password;
  ALTER TABLE CB_TABLE_PREFIXusers ADD usr_changepass_c VARCHAR( 32 ) NOT NULL AFTER usr_changepass;
  UPDATE CB_TABLE_PREFIXusers SET usr_publicemail=1 WHERE usr_publicemail='TRUE';
  UPDATE CB_TABLE_PREFIXusers SET usr_publicemail=0 WHERE usr_publicemail='FALSE';
  ALTER TABLE CB_TABLE_PREFIXusers CHANGE usr_publicemail usr_publicemail TINYINT UNSIGNED DEFAULT '0' NOT NULL;
  UPDATE CB_TABLE_PREFIXusers SET usr_pref_skin='BlueSkin' WHERE usr_pref_skin='Official';
  ALTER TABLE CB_TABLE_PREFIXusers CHANGE usr_mod usr_mod TEXT NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXusers CHANGE usr_nbmess usr_nbmess MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXusers CHANGE usr_id usr_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT;
  ALTER TABLE CB_TABLE_PREFIXusers CHANGE usr_registertime usr_registertime INT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXusers CHANGE usr_class usr_class SMALLINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXusers CHANGE usr_nbmp usr_nbmp SMALLINT UNSIGNED DEFAULT '0' NOT NULL;
  UPDATE CB_TABLE_PREFIXusers SET usr_ip='';
  ALTER TABLE CB_TABLE_PREFIXusers CHANGE usr_ip usr_ip INT NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXusers CHANGE usr_pref_usrs usr_pref_usrs TINYINT UNSIGNED DEFAULT '20' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXusers CHANGE usr_pref_topics usr_pref_topics TINYINT UNSIGNED DEFAULT '20' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXusers CHANGE usr_pref_msgs usr_pref_msgs TINYINT UNSIGNED DEFAULT '15' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXusers CHANGE usr_pref_res usr_pref_res TINYINT UNSIGNED DEFAULT '15' NOT NULL;
  
  -- Modifications à apporter à la table 'groups'
  ALTER TABLE CB_TABLE_PREFIXgroups CHANGE gr_id gr_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT;
  ALTER TABLE CB_TABLE_PREFIXgroups ADD gr_status TINYINT UNSIGNED DEFAULT '0' NOT NULL AFTER gr_name;
  UPDATE CB_TABLE_PREFIXgroups SET gr_status=1 WHERE gr_mod=1;
  UPDATE CB_TABLE_PREFIXgroups SET gr_status=2 WHERE gr_admin=1;
  ALTER TABLE CB_TABLE_PREFIXgroups DROP gr_admin , DROP gr_mod;
  ALTER TABLE CB_TABLE_PREFIXgroups CHANGE gr_cond gr_cond SMALLINT DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXgroups CHANGE gr_mps gr_mps SMALLINT UNSIGNED DEFAULT '20' NOT NULL;
  
  -- Modifications à apporter à la table 'automessages'
  ALTER TABLE CB_TABLE_PREFIXautomessages CHANGE am_id am_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT;
  
  -- Modifications à apporter à la table 'forums'
  ALTER TABLE CB_TABLE_PREFIXforums CHANGE forum_id forum_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT;
  ALTER TABLE CB_TABLE_PREFIXforums CHANGE forum_order forum_order SMALLINT DEFAULT '0' NOT NULL;
  
  -- Modifications à apporter à la table 'log'
  ALTER TABLE CB_TABLE_PREFIXlog CHANGE log_type log_type TINYINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXlog CHANGE log_usermake log_usermake MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXlog CHANGE log_timestamp log_timestamp INT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXlog CHANGE log_rep_user log_rep_user MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXlog CHANGE log_rep_topic log_rep_topic MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXlog CHANGE log_rep_msg log_rep_msg MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  
  -- Modifications à apporter à la table 'mp'
  ALTER TABLE CB_TABLE_PREFIXmp CHANGE mp_id mp_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT;
  ALTER TABLE CB_TABLE_PREFIXmp CHANGE mp_read mp_read TINYINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXmp CHANGE mp_to mp_to MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXmp CHANGE mp_from mp_from MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXmp CHANGE mp_to_del mp_to_del TINYINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXmp CHANGE mp_from_del mp_from_del TINYINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXmp CHANGE mp_timestamp mp_timestamp INT UNSIGNED DEFAULT '0' NOT NULL;
  
  -- Modifications à apporter à la table 'pollpossibilities'
  ALTER TABLE CB_TABLE_PREFIXpollpossibilities CHANGE poss_id poss_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT;
  ALTER TABLE CB_TABLE_PREFIXpollpossibilities CHANGE poss_pollid poss_pollid MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXpollpossibilities CHANGE poss_votes poss_votes MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  
  -- Modifications à apporter à la table 'polls'
  ALTER TABLE CB_TABLE_PREFIXpolls CHANGE poll_id poll_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT;
  ALTER TABLE CB_TABLE_PREFIXpolls CHANGE poll_topicid poll_topicid MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXpolls CHANGE poll_totalvotes poll_totalvotes MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXpolls CHANGE poll_white poll_white MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  
  -- Modifications à apporter à la table 'reports'
  ALTER TABLE CB_TABLE_PREFIXreports CHANGE rep_id rep_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT;
  ALTER TABLE CB_TABLE_PREFIXreports CHANGE rep_msgid rep_msgid MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXreports CHANGE rep_userid rep_userid MEDIUMINT UNSIGNED DEFAULT '0' NOT NULL;
  ALTER TABLE CB_TABLE_PREFIXreports CHANGE rep_timestamp rep_timestamp INT UNSIGNED DEFAULT '0' NOT NULL;
  
  -- Ajout de la table 'banned'
  CREATE TABLE `CB_TABLE_PREFIXbanned` (
    `ban_ip` int(11) NOT NULL default '0',
    `ban_expires` int(11) NOT NULL default '0',
    UNIQUE KEY `ban_unique` (`ban_ip`)
  ) ENGINE=MyISAM;