Problems upgrading from FreePBX 2.1.1 to FreePBX 2.5.1

I attempted a upgrade from an old machine following these instructions:
http://freepbx.org/support/documentation/installation/upgrading-your-system

I had a Trixbox 1.2.3 (i think) using FreePBX 2.1.1. I want to untrix it as much as possible. It’s Centos 4.3.

And when I ran the upgrade it went smooth but retrieve_conf now gives this error:
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
[FATAL] SELECT grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, description, alertinfo FROM ringgroups WHERE grpnum = [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 1]SQL -
SELECT grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, description, alertinfo FROM ringgroups WHERE grpnum =

Any ideas how I can fix this?

Thanks!

when you ran the install did you use ./install_amp --force-version=2.1.1
If not you can run it again with no ill effects.

If memory serves me correctly there was a change to some of the tables at version 2.2.0.

Yes, I tried that and it didn’t do anything different.

Any other ideas?

I tried upgrading mysql, as per this thread:
http://www.freepbx.org/forum/sql-sintax-error-after-upgrade

Still no dice. The whole phone system doesn’t work now, and I don’t have local access to it so I’m really concerned. I did do a full backup before this though.

If there’s no way to fix it, anyone have any idea howto downgrade? I can’t really reload it…

Thanks!