Matthew,

I am assuming you did this upgrade on the jRoller system db? or is this on a test system with only a few blogs?

The upgrade sql script doesn't actually come with any sql that migrates the necessary data from a 1.3 db into the new tables and columns for a 2.0 db. That part of the upgrade process is actually handled in the application via the UpgradeDatabase process after you deploy the 2.0 app. You should have seen messaging in your log files that said "Doing upgrade to 200...", etc. If that didn't happen then that would definitely be strange, but it's possible that you somehow ended up on a funky upgrade path.

I would first check for that 2.0 upgrade messaging and see if it is actually there. If not, then you may want to do the upgrade to 1.3 separately and make sure that seems to be working, then try upgrading to 2.0. The upgrade to 1.3 should be very quick.

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.

-- Allen


Matthew P. Schmidt wrote:

I'll try mapping the request filter to /index.jsp and see what happens. That might be enough to get it jumpstarted. As for the database, I think it was pretty close to stock. We may have added a new indices or two in the last two weeks and other than the four missing indices, it seemed to drop everything just fine and run the upgrade script. I don't see anything in the mysql upgrade script that generates those handles or creates the relationships. Am I missing something?

-Matt

Dave Johnson wrote:


On Nov 14, 2005, at 11:10 AM, Matthew Schmidt wrote:

Just a followup, it could be that the frontpage lists old entries because it can only find one user with a handle and so is only listing those users. If you hit it in the next hour or so, http://rr.javalobby.org:20900 should be up for testing. It also appears that hitting the site from 'links' on linux redirects properly, while firefox does not. As I said, a hard redirect to main.do is probably not a good thing and unless I changed Jroller from the default, I don't think 1.2 did that :)

Hey guys. We're in the process of trying to migrate to Roller 2.0 and also ran into some of the indices problems. Easily resolved, but there are other issues.

1) Just visiting / doesn't appear to redirect to main.do or forward to main.jsp like it used to. We'd like to not have a hard redirect to main.do as that would screw with our page ranks and indexing with the various search engines.
2) If I do go to /, I get the following error:



The main pages need the RequestFilter and since your front page has no *.do extension, you'll have to map /* to the RequestFilter. That's sub-optimal because some pages don't need the overhead of the request filter (e.g. the RSS feeds).

We want the main pages to go in the page cache, so we map planet.do and main.do to the PageCacheFilter. Since you arrive at the front page without main.do in your URL, you won't get any of the normal caching.

I don't have a good solution for this problem and we've been running with the redirect and the *.do URLs for over six months now, so I'm against changing it for 2.0. Perhaps it could be addressed in the cache rewrite coming in 2.1.


3) Hitting main.do gives me a bunch of old entries, back to 2003.

4) The hot blogs list has all blogs listed with a /page as the url, no handle. It appears that none of the blogs have a handle after the upgrade. There also doesn't appear to be anything in the upgrade script that generates them.



This is troubling. Has anybody else run into this problem of the upgrade script not creating handles?


5) If I login as one of the users, it doesn't think I have any weblogs, when I clearly did before.



And not creating weblog-user relationships?

That looks like an upgrade problem too, but it's going to be difficult to diagnose if we can't reproduce. You do have a customized Roller 1.2 installation. How close was your old database to the stock Roller 1.2?

- 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