MyBB Community Forums

Full Version: Merge "users" 1.2 to 1.4 [Problem FIXED -> Tutorial in]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone !
I would merge my table MyBB Users 1.2.14 to my MyBB Users table 1.4.2.

But most line changed in SQL code...

Short exemple:

[Image: preview.php?i=f22483fd-ede1-484a-9ed1-1afc9807aa7c]


I don't know how change a SQL file structure.


Sorry if my english's spoken is not good, i'm french.
I've analyse the Table Users 1.2 & 1.4

Uninstall ALL PLUGIN in 1.2 AND in your 1.4.

Exec this SQL code into your Database with PhpMyAdmin. (change the mybb_ is differ)

This convert your Users Table 1.2 to 1.4, after exec this, export SQL & import to your 1.4
Exemple: You create a new forum for a new start, but with your members (only RAZ posts)
 ALTER TABLE `mybb_users`  DEFAULT CHARACTER SET utf8;
 ALTER TABLE `mybb_users` DROP INDEX `username` ,
ADD UNIQUE `username` ( `username` ) 
ALTER TABLE `mybb_users` ADD `birthdayprivacy` CHAR( 4 ) NOT NULL DEFAULT 'ALL' COMMENT ' `birthdayprivacy` CHAR(4) NOT NULL default ''all'',' AFTER `birthday` ;
 ALTER TABLE `mybb_users` CHANGE `allownotices` `allownotices` INT( 1 ) NOT NULL DEFAULT '0',
CHANGE `hideemail` `hideemail` INT( 1 ) NOT NULL DEFAULT '0',
CHANGE `emailnotify` `subscriptionmethod` INT( 1 ) NOT NULL DEFAULT '0',
CHANGE `invisible` `invisible` INT( 1 ) NOT NULL DEFAULT '0',
CHANGE `receivepms` `receivepms` INT( 1 ) NOT NULL DEFAULT '0',
CHANGE `pmpopup` `pmnotice` INT( 1 ) NOT NULL DEFAULT '0',
CHANGE `pmnotify` `pmnotify` INT( 1 ) NOT NULL DEFAULT '0',
CHANGE `remember` `remember` INT( 1 ) NOT NULL DEFAULT '0';
 ALTER TABLE `mybb_users` CHANGE `showsigs` `showsigs` INT( 1 ) NOT NULL DEFAULT '0',
CHANGE `showavatars` `showavatars` INT( 1 ) NOT NULL DEFAULT '0',
CHANGE `showquickreply` `showquickreply` INT( 1 ) NOT NULL DEFAULT '0',
CHANGE `showredirect` `showredirect` INT( 1 ) NOT NULL DEFAULT '0';
 ALTER TABLE `mybb_users` CHANGE `dst` `dst` INT( 1 ) NOT NULL DEFAULT '0';
ALTER TABLE `mybb_users` ADD `dstcorrection` INT( 1 ) NOT NULL DEFAULT '0' COMMENT ' `dstcorrection` int(1) NOT NULL default ''0'',' AFTER `dst`;
 ALTER TABLE `mybb_users` CHANGE `away` `away` INT( 1 ) NOT NULL DEFAULT '0';
ALTER TABLE `mybb_users` ADD `lastip` VARCHAR( 50 ) NOT NULL DEFAULT '0' AFTER `regip` ,
ADD `longregip` INT( 11 ) NOT NULL DEFAULT '0' AFTER `lastip` ,
ADD `longlastip` INT( 11 ) NOT NULL DEFAULT '0' AFTER `longregip` ;
 ALTER TABLE `mybb_users` DROP `newpms` ;
ALTER TABLE `mybb_users` ADD `warningpoints` INT( 3 ) NOT NULL DEFAULT '0' AFTER `unreadpms` ,
ADD `moderateposts` INT( 1 ) NOT NULL DEFAULT '0' AFTER `warningpoints` ,
ADD `moderationtime` BIGINT( 30 ) NOT NULL DEFAULT '0' AFTER `moderateposts` ,
ADD `suspendposting` INT( 1 ) NOT NULL DEFAULT '0' AFTER `moderationtime` ,
ADD `suspensiontime` BIGINT( 30 ) NOT NULL DEFAULT '0' AFTER `suspendposting` ,
ADD `coppauser` INT( 1 ) NOT NULL DEFAULT '0' AFTER `suspensiontime` ,
ADD `classicpostbit` INT( 1 ) NOT NULL DEFAULT '0' AFTER `coppauser` ;

You can backup ONLY users who had more than 0post from your 1.2 board.

SELECT *
FROM `mybb_users`
WHERE `usergroup` = '2'
AND `postnum` >= '1' 


French version of this post is here:
http://mybb.fr/showthread.php?tid=959
Your users must be edit settings in UserCP.