Recent Topics

1 Jul 13, 2006 08:52    

So I'm trying to upgrade to the latest version of 1.8 beta from 0.9.2.

First I get this:

Database schema is not up to date!
You have schema version «8066», but we would need «9200».

Okay, so I select upgrade on the next screen.
BUT I get all sorts of problems. First it tells me that that evo_Plugins already exists and I have to delete it.

Table 'evo_plugins' already exists(Errno=1050)

Okay, so I go into phpMyadmin and delete it.
Then it tells me that evo_links already exists and I need to delete it, so I do.

Then it tells me this:

Can't DROP 'blog_stub'; check that column/key exists(Errno=1091)

So I check for blog_stub and it seems to exist. I'm not sure what to do now. Why am I getting all these errors anyway? Doesn't the upgrade script for 1.8 work?

2 Jul 19, 2006 06:23

So nobody here has a clue what the problem might be then?
I guess nobody else is having issues.
Why would this only affect me? How odd.
Hopefully someday I`ll find a way to upgrade.

3 Jul 19, 2006 15:40

avoidinglife wrote:

First I get this:

Database schema is not up to date!
You have schema version «8066», but we would need «9200».

This worries me a bit. It seems like you upgraded your files and tried to run your blog, then went to the installer. Is that close? Because normally if you go to the installer it'll give you the page that asks you what you want to do. I admit to only doing one upgrade though, and since I sort of knew how to get it done I just did it instead of doing it like a 'normal' person might.

I hope you have a backup of your database from before attempting to upgrade because you might need to restore it so the upgrade can happen.

So let's review the steps you took.
Backed up your database?
Backed up your files?
Deleted all the b2evolution files and folders from your server?
Unzipped and uploaded all the new files and folders to your server?
Went to yourdomain.com/install/install.php?

Information will help is why I'm asking. Mostly though if you have a backup of your database and files we can get you going. I think!

4 Jul 19, 2006 23:27

DB schema version "8066" refers to b2evo 0.9.1, not 0.9.2 (which has been released as 1.6). Are you sure you have been using 0.9.2 before?!?

The upgrade procedure takes place in /install/_functions_evoupgrade.php:

What fails, is the upgrade-to-1.6 block, which starts with:

if( $old_db_version < 9000 )

.

I'd manually remove/comment out the parts therein that fail (e.g., if it says "evo_plugins already exists", remove/comment out the "echo 'Creating plugins table... ';" block.

The main problem is "just", that if the upgrade fails in this block and no checkpoint has been created before, it will likely fail the next time you try somewhere above (e.g. because a table has been created in the previous run).

If you want try to fix it that way, take a backup, of course and you should not need to go beyond the

set_upgrade_checkpoint( '9000' );

point, after which the upgrade-to-1.8 part begins.

Good luck!

5 Jul 20, 2006 12:45

What I did was try upgrading the site normally. Upload all the files to a fresh directory, then point the installer to the old database for upgrading. It was durring the upgrade that it found an evo_plugins table it wasn't expecting I guess.

The version of B2 Evo my site currently is running is b2evo v 0.9.2 according to my admin page. If the database isn't supposed to be 8066, then I don't know why it isn't so, or why my site is even working at all for that matter.

I don't understand what you mean by "not 0.9.2 (which has been released as 1.6)". Does 1.6 and 0.9.2 use the same database scheme? I don't remember anymore, but maybe I tried to upgrade to 1.6 at some point and then decided to stick to 0.9.2?

Another possible reason is that I've been having a lot of trouble restoring databases through Cpanel lately. Perhaps some tables, such as evo_settings were not updated correctly durring an old restore.

Perhaps if I change the setting for "db_version" to the correct number for 0.9.2 the upgrade will work. Does that make sense? If you think that's a good idea then please let me know the number.

Thanks both of you for your help!

6 Jul 20, 2006 18:38

If you attempted to upgrade to 1.6 and decided against it the only way to go backwards would have been by restoring your database. Or manually alter each table and field to it's "previous" condition. There is no "go back" option when you upgrade is what I mean.

I would say do NOT manually change the db schema in the settings table because that, more or less, only tells b2evolution's installer where to begin altering and adding tables. So like if you have version 0.8.9 you have schema XXXX. Now the installer knows "first bring them up to the next level ... now bring them up to the next level ... now bring them up to " - you get the idea. Anyway if you manually try to set it backwards the installer will choke because a table it thinks it needs to create already exists.

Trouble restoring databases sounds like you've got a backup from before everything went bad but you aren't sure it's being properly restored. That's bad, but a nice hint on how to go forward.

Check out your database via phpmyadmin and tell me how many tables you have in it. I have test installations for 0.9.2, 1.6, and 1.8. My 0.9.2 installation has 12 tables and db_version is 8066. My 1.6 installation has 23 tables and db_version is 9000. My 1.8 installation has 30 tables and db_version is 9200.

Ultimately blueyed's solution is probably where you'll end up, but you should make sure of where you're at before you go further forward.
blueyed wrote:

The upgrade procedure takes place in /install/_functions_evoupgrade.php:

What fails, is the upgrade-to-1.6 block, which starts with:
Code:
if( $old_db_version < 9000 )
.

7 Jul 20, 2006 21:18

Sorry, I've messed up with 0.9.2 and 1.6. If you have db_schema 8066 then you're at 0.9.2.

As it seems, you have no chance as to follow my previous advise.

Before doing so, you might want to try setting the db_schema manually to 9000 in evo_settings, and pretend that you have upgraded to 1.6 before, but that would probably fail, because something in that upgrade path might be missing then.

On the other hand, if the DB really is already in the 1.6 format and you've only changed the db_schema value by accident, then it could work.

Before doing either, please do a backup of course.

8 Jul 21, 2006 02:33

Well I tried setting the database to 9000, but that didn't work so I guess I'll have to try the way you suggested. I wish I knew how my database got so messed up to begin with. My original database from long ago was a B2 database which I upgraded to B2Evo, but I imagine that isn't the reason for the problems.

Is there any simple way to inject post and comment data from an 0.9.2 database into a fresh install of 1.8? I've been trying to figure out how to do it, but can't find a way. This is further complicated by how radically the evo_posts table among others has changed since 0.9.2. I guess commenting out the upgrader is my best bet.

Thanks for your help!
-Jamie


Form is loading...