Sure,

I've sent it out, so anyone can include it in the scripts if they want.  I 
tried a number of times to inform everyone about the issue and asked for some 
help to get it included in the scripts, but I was ignored so I gave up.

The only real problem with the script the way it is now is that it's mysql 
specific.  The maintainers of the other dbs will have to test it out and if 
some of the statements don't work then we would have to work on a db 
independent way to include it.

I know this may start to sound like a broken record, but I think this serves as 
another example of why it would probably be better if we ditched the whole 
"-raw" db independent script and just managed the scripts for each db 
separately.

-- Allen


On Tue, 2005-11-15 at 05:14, Dave Johnson wrote:
> 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';
> 

Reply via email to