Allen wrote:
Now, assuming you are working on your large jRoller db, the
application upgrade process would take you roughly 4.5 days by my last
test case. Yes, I said 4.5 DAYS. That's because the part of the
upgrade handled by the app is iterating through each weblog in your db
and one-by-one it's updating the necessary data and inserting some new
data. When I tested this on our 1600 blog db it took me ~20 hrs.
To get around this I created the attached mysql scripts which does the
data migration part that you seem to be missing. Hopefully that
helps.
Can we include that in the 2.0 release (in the migration script) and
take out the slow Java code?
- Dave
-- this should only be run once to update the data set from 1.3 to 2.0
-- subsequent uses of this script on a 2.0 database may cause problems
-- fix people who changed their root category
update website,weblogcategory set website.defaultcatid =
weblogcategory.id where weblogcategory.websiteid=website.id and
weblogcategory.name = 'root';
-- set website handles using old usernames
UPDATE website,rolleruser SET website.handle = rolleruser.username
WHERE website.userid = rolleruser.id AND website.handle = '';
-- set weblog entry creator and publish state for PUBLISHED entries
UPDATE website,rolleruser,weblogentry SET
weblogentry.userid=rolleruser.id, weblogentry.status='PUBLISHED' WHERE
website.userid=rolleruser.id AND website.id=weblogentry.websiteid AND
weblogentry.userid = '' AND weblogentry.publishentry = 1;
-- set weblog entry creator and publish state for DRAFT entries
UPDATE website,rolleruser,weblogentry SET
weblogentry.userid=rolleruser.id, weblogentry.status='DRAFT' WHERE
website.userid=rolleruser.id AND website.id=weblogentry.websiteid AND
weblogentry.userid = '' AND weblogentry.publishentry = 0;
-- insert new permissions masks for all existing weblogs
INSERT into roller_user_permissions(id, website_id, user_id,
permission_mask, pending) SELECT concat(website.id,
'p'),website.id,rolleruser.id,3,0 FROM website,rolleruser WHERE
website.userid=rolleruser.id;
-- set roller db version to 2.0
UPDATE roller_properties SET value = '200' WHERE name =
'roller.database.version';