Unknown column 'schema_version' in 'field list' query
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.

...soooory, but (again) this
...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.
The 'schema_version' field
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.
..luckily enough I do have a
..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..
If you run it on your backup
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.
hello again,
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.
Obviously the database
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.
yes!
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..
Please stop because I become
Please stop because I become full of myself and as a result I do not improve :p
:]
+++ thnx +++ stop +++ greetz +++ till +++ stop +++
Problem upgrading from 4.5 to 4.7 and beyond
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.