hello everybody,

so far I only had 1 installation of drupal 4.5.1 running - finally decided to upgrade to 4.7.4, almost everything went well: I had some strange error coming up when running the update.php ..and then my little computer crashed, so that i couldnt even check what kind of error occured. Dawn.

Anyways: the upgraded site seems to run well - but when checking the admin-page "/admin/modules" I get a long list of errors, first one is this::
-------------->
# user warning: Unknown column 'schema_version' in 'field list' query: SELECT filename, name, type, status, throttle, schema_version FROM system WHERE type = 'module' in /www/htdocs/ltdorg/includes/database.mysql.inc on line 121.
<--------------

..all the others are like this:
-------------->
user warning: Duplicate entry 'modules/admin.module' for key 1 query: INSERT INTO system (name, description, type, filename, status, throttle, bootstrap) VALUES ('admin', 'Handles the administration pages.', 'module', 'modules/admin.module', 0, 0, 0) in /www/htdocs/ltdorg/includes/database.mysql.inc on line 121
<--------------

..one error message for every module installed.

I tried to search for "Unknown column 'schema_version'" but only got one page returned - which wasnt helpful. Does anybody else know what to do next..?

thank you very much, greeting, till.

Comments

tille’s picture

...soooory, but (again) this was not what i wanted to post - some parts have been chopped off.. - ..so I try it again..:

hello everybody,

so far I only had 1 installation of drupal 4.5.1 running - finally decided to upgrade to 4.7.4, almost everything went well: I had some strange error coming up when running the update.php ..and then my little computer crashed, so that i couldnt even check what kind of error occured. Dawn.

Anyways: the upgraded site seems to run well - but when checking the admin-page "/admin/modules" I get a long list of errors, first one is this::
--------------
# user warning: Unknown column 'schema_version' in 'field list' query: SELECT filename, name, type, status, throttle, schema_version FROM system WHERE type = 'module' in /www/htdocs/ltdorg/includes/database.mysql.inc on line 121.
--------------

..all the others are like this:
--------------
user warning: Duplicate entry 'modules/admin.module' for key 1 query: INSERT INTO system (name, description, type, filename, status, throttle, bootstrap) VALUES ('admin', 'Handles the administration pages.', 'module', 'modules/admin.module', 0, 0, 0) in /www/htdocs/ltdorg/includes/database.mysql.inc on line 121
--------------

..one error message for every module installed.

I tried to search for "Unknown column 'schema_version'" but only got one page returned - which wasnt helpful. Does anybody else know what to do next..?

thank you very much, greeting, till.

___________________________

cog.rusty’s picture

The 'schema_version' field did not exist in the 'system' table in Drupal 4.5 but it should have been created during the update to 4.7.4.

"Unknown column 'schema_version'" means that this field was not found, so, apparently your update was not completed.

It is unfortunate if you don't have a backup of your database to run the update from scratch. You can try to run it again anyway, and then try to handle any remaining errors.

tille’s picture

..luckily enough I do have a backup ..:]

..thanks for the quick reply - I'll try to run it again . although it says you shouldn't..? ..I'll try anyways...

greetz, till..

___________________________

cog.rusty’s picture

If you run it on your backup it will be like the first time, so no problem.

If you run it on your damaged database, then it depends on whether it is clean enough for the update script to know where to start.

tille’s picture

hello again,

I just went through this: I threw the db over board, put the backup back in place and then ran the update script - went all all right - but still the same errors on the modules page:

-------------

user warning: Unknown column 'schema_version' in 'field list' query: SELECT filename, name, type, status, throttle, schema_version FROM system WHERE type = 'module' in /www/htdocs/ltdorg/includes/database.mysql.inc on line 121.

user warning: Duplicate entry 'modules/aggregator.module' for key 1 query: INSERT INTO system (name, description, type, filename, status, throttle, bootstrap) VALUES ('aggregator', 'Aggregates syndicated content (RSS, RDF, and Atom feeds).', 'module', 'modules/aggregator.module', 0, 0, 0) in /www/htdocs/ltdorg/includes/database.mysql.inc on line 121.

----------

..and then the second error repeating for all the modules..

..huh. Any ideas..? ..should I try to alter the tables by hand..? ..but how..?

greetz, till.

PS: and on the themes page I get this error message:

warning: Missing argument 1 for xtemplate_templates() in /www/htdocs/ltdorg/themes/engines/xtemplate/xtemplate.engine on line 20.
user warning: Unknown column 'schema_version' in 'field list' query: SELECT filename, name, type, status, throttle, schema_version FROM system WHERE type = 'theme' in /www/htdocs/ltdorg/includes/database.mysql.inc on line 121.

___________________________

cog.rusty’s picture

Obviously the database upgrade did not work well.

The only thing I can think at this moment is that jumping from 4.5.1 to 4.7.4 does not work well. Try to repeat it in two steps, 4.5.1 to 4.6.10 and then 4.6.10 to 4.7.4.

If it works, you will still have to deal with your modules' upgrades or replacements, of course.

tille’s picture

hello CogRusty,

..it went through! So the problem was obviously, that upgrading from 4.5.1 to 4.7.4 is not possible - one has to take the extra step through 4.6.10.

One useful details for others that are trying the same: first of all: be careful with your db-backup! ..take it serious! This said: one more thing: you dont have to backup EVERYTHING.. it helped me a lot to reduce the db backup file size by throwing things over board that i didnt need: comments (only 2 'real' comments, but some 2000(!) archived spam-comments that never got published, but still ate up a lot of space..), and also trashing the accesslog-table save a lot of space - and time..:] ..this way i reduced the backup-file size from ~10MB to 1.2MB which made handling a lot easier..

well - i think that was it - thank you very much CogRusty, without your advice i probably would not have gone all the way..:]

greetingz from Berlin, till..

___________________________

cog.rusty’s picture

Please stop because I become full of myself and as a result I do not improve :p

tille’s picture

+++ thnx +++ stop +++ greetz +++ till +++ stop +++

___________________________

thom k in the usa@thisiswhatdemocracylookslike.com’s picture

I have run into the same problem trying to upgrade a site from 4.5 to 5.1.

I did the incremental upgrade to 4.6 first and then went from 4.6 to 5.1 and that worked.

To get the upgrade to 4.6 to work I had to make two changes with phpmyadmin. First, I had a duplicate entry in the sessions table so I emptied that out. The second thing I did was to manually add severity field to the watchdog table. This is done in the upgrade script but I had some problems if this was not in there when the upgrade started at #110. I think severity is added at #115.

When you run the upgrade from 4.6 to 5.1, the upgrade script wants to start again at step #110. You need to manually select the upgrade version starting from step #133.

DJoh’s picture

Hi,

Where in the world did you find out which "System module" (#110-179) corresponds to which Drupal version (4.5x-4.7x)?
I ask because i have 4.6.11 installed right now, and am trying to upgrade to 4.7.0. Choosing #133 gives me many "duplicate entry" type of errors when update.php completes, so I imagine my version must be later than #133.

How confusing, to track multiple, seemingly unrelated version numbers...
If you remember how you made the correlation I'd LOVE to know!

Thanks.

cog.rusty’s picture

Here is how to figure out the updates, but before doing that, make sure that you have tried everything properly, without selecting any updates manually, because the proper procedure is well tested and there are some subtle points.

In 4.6.11, at the end of database/updates.inc, you can see update_132(). So, obviously the next one starts from 133.
http://cvs.drupal.org/viewvc.py/drupal/drupal/database/updates.inc?revis...

In 4.7.0, at the end of database/updates.inc, the last one is system_update_179().
http://cvs.drupal.org/viewvc.py/drupal/drupal/database/updates.inc?revis...

In 4.7.11, at the end of database/updates.inc, the last one is system_update_184().
http://cvs.drupal.org/viewvc.py/drupal/drupal/database/updates.inc?revis...

If you have a good 4.6.11 database backup, try again 4.6.11->4.7.11 without forcing any update number manually.

DJoh’s picture

Thanks cog.rusty,

I've tried the update a number of ways, all following the instructions ( backedup files+db, disable all 3rd party modules & go to default theme via 1st user, replace all files with updated files only, then do update.php, etc.). I haven't got much past that really because of how many DB errors I get.

First I tried 4.6.11 (the current install) --> 4.7.0, without trying anything special. Gave me tons of database errors, including the "unknown column 'schema_version' in 'field list' query" and also many "duplicate entry" ones, including one for "severity". I had tons of problems with the "severity" col. when going from 4.5.x to 4.6.x, and similar to how I finally figured that one out, this problem must also be defaulting to #110 instead of #115/later. I tried this twice without changing the auto-detected DB version, with identical results.
So next try (after restoring db/file backups) I checked which DB version it auto-detected, and it was trying to start at #110 again.

So i tried manually setting the DB version (in update.php) to #133 (since my update.inc shows #132, as you mentioned), and now I get mostly "duplicate entry" type errors, about 30-40 of them.
Each time I'm restoring the backup files/db, then doing the whole procedure again. I'll post some of the errors this evening when I try again, but honestly it always shows #110 as the auto-detected upgrade point, no matter whether I'm upgrading to 4.7.0, 4.7.11 or 4.5.12 (these are the one's I've tried so far, the auto-detection is broken for some reason!). I'd heard that 4.5.12 could have a smoother upgrade path, but for me it appears to have the same problem.

You help is greatly appreciated, and thanks for posting those links to the various update.php's.
(interesting how the 4.7.x versions removed that useful table from updates.inc. Also, 4.7.0 goes through 50 DB updates (#133-179) after the last version of 4.6.x, 4.6.11. I suppose that's normal for a 2nd-decimal-point upgrade?)

I'll try the 4.7.11 update again with auto-detected DB version and see what happens, and will report back here in about 8-9 hours.

cog.rusty’s picture

If update #110 comes up whatever you try, make sure that you don't have a backup copy of some 4.5.x version somewhere under the new Drupal version, in case it is picking up the updates.inc file of that old version.