Fork me on GitHub
Current Releases are 2.1 stable (major release) and 2.0.18.11 (security patch for 2.0)
We've also rebooted our GitHub repo, docs, and more!

How to integrate (and not import) your previous database with all user easily in Lussumo

MilingoMilingo New
edited September 2012 in Questions

Yesterday I made an installation of lussumo on my site and wanted to import all of the user from my database to the new one.
That would be easy but the downside is that if a user wants to change password I would have to update the table on Lussumo too.
What i did and it's apparently working is this:

database #1 mysite (the one with all your users)
database #2 lussumo (lussumo's new installed database)

Alter your previous user's table (users) in your other database (#1)


ALTER TABLE mysite.users
ADD `RoleID` int(2) NOT NULL default '3',
#3 means registered user
ADD `StyleID` int(3) NOT NULL default '1',
#1 is the theme id
ADD `CustomStyle` varchar(255) collate utf8_bin default NULL,
ADD `FirstName` varchar(50) collate utf8_bin NOT NULL default '',
ADD `LastName` varchar(50) collate utf8_bin NOT NULL default '',
ADD `VerificationKey` varchar(50) collate utf8_bin NOT NULL default '',
ADD `EmailVerificationKey` varchar(50) collate utf8_bin default NULL,
ADD `UtilizeEmail` enum('1','0') collate utf8_bin NOT NULL default '0',
ADD `ShowName` enum('1','0') collate utf8_bin NOT NULL default '1',
ADD `Attributes` text collate utf8_bin,
ADD `CountVisit` int(8) NOT NULL default '0',
ADD `CountDiscussions` int(8) NOT NULL default '0',
ADD `CountComments` int(8) NOT NULL default '0',
ADD `DateFirstVisit` datetime NOT NULL default '0000-00-00 00:00:00',
ADD `DateLastActive` datetime NOT NULL default '0000-00-00 00:00:00',
ADD `RemoteIp` varchar(100) collate utf8_bin NOT NULL default '',
ADD `LastDiscussionPost` datetime default NULL,
ADD `DiscussionSpamCheck` int(11) NOT NULL default '0',
ADD `LastCommentPost` datetime default NULL,
ADD `CommentSpamCheck` int(11) NOT NULL default '0',
ADD `UserBlocksCategories` enum('1','0') collate utf8_bin NOT NULL default '0',
ADD `DefaultFormatType` varchar(20) collate utf8_bin default NULL,
ADD `Discovery` text collate utf8_bin,
ADD `Preferences` text collate utf8_bin,
ADD `SendNewApplicantNotifications` enum('1','0') collate utf8_bin NOT NULL default '0',
ADD `SubscribeOwn` tinyint(1) NOT NULL,
ADD `Notified` tinyint(1) NOT NULL,
ADD KEY `user_role` (`RoleID`),
ADD KEY `user_style` (`StyleID`);


DROP TABLE IF EXISTS lussumo.LUM_User;
DROP VIEW IF EXISTS lussumo.LUM_User;

CREATE VIEW lussumo.LUM_User AS
SELECT
users.*,
uid AS UserID,
username AS Name,
big_pic AS Picture,
avatar AS Icon

#obviously you have to change the name in an appropriate way

FROM mysite.users;

That's the idea. from now on if you update your password on Lussumo the user will have the same update in your other database.
I guess you need mysql 5.

Hope it helps

This discussion has been closed.