Forum archive 2000-2006

Ben Pollina - Upgrade from 2.1 to 2.2

Ben Pollina - Upgrade from 2.1 to 2.2

by Arnold Pizer -
Number of replies: 0
inactiveTopicUpgrade from 2.1 to 2.2 topic started 12/20/2006; 8:11:48 AM
last post 12/20/2006; 11:36:49 AM
userBen Pollina - Upgrade from 2.1 to 2.2  blueArrow
12/20/2006; 8:11:48 AM (reads: 99, responses: 3)
We've been running WW2.1.3 this fall, and now that the semester has ended I'm trying to move to 2.2 and then hopefully to 2.3. I converted all of our existing courses to sql_single using the sql2sql_single utility. However, when I attempt to login to any of these courses I get the following error message.
    BD::mysql::st execute failed: Unknown column 'assignment_type' in 'field list' at /opt/webwork2/lib/WeBWorK/DB/Schema/ line 227.

Call stack

The information below can help locate the source of the problem.

* in WeBWorK::DB::Schema::SQL::gets called at line 1439 of /opt/webwork2/lib/WeBWorK/
* in WeBWorK::DB::getUserSets called at line 2096 of /opt/webwork2/lib/WeBWorK/
* in WeBWorK::DB::getMergedSets called at line 141 of /opt/webwork2/lib/WeBWorK/ContentGenerator/
* in WeBWorK::ContentGenerator::ProblemSets::body called at line 152 of /opt/webwork2/lib/WeBWorK/
* in WeBWorK::Template::template called at line 437 of /opt/webwork2/lib/WeBWorK/
* in WeBWorK::ContentGenerator::content called at line 174 of /opt/webwork2/lib/WeBWorK/
* in WeBWorK::ContentGenerator::go called at line 299 of /opt/webwork2/lib/

Any suggestions would be appreciated.

Ben Pollina University of Hartford

<| Post or View Comments |>

userMichael Gage - Re: Upgrade from 2.1 to 2.2  blueArrow
12/20/2006; 8:22:15 AM (reads: 128, responses: 0)
Hi Ben,

Run the command .../webwork2/bin/wwdb_addgw to update the database. This adds some extra fields to the database which are needed for the gateway quiz module.

Later when you upgrade to 2.3.1 you will want to run bin/wwdb_upgrade which again upgrades the database. (wwdb_addgw was a one time script -- wwdb_upgrade is planned to be a standard way to upgrade the fields in the database when changing versions.

Hope this helps.

-- Mike

Details: 1. go to and use the browser search to find wwdb_addgw

2. when upgrading to 2.3 go to and search for wwdb_addgw or wwdb_upgrade



<| Post or View Comments |>

userBen Pollina - Re: Upgrade from 2.1 to 2.2  blueArrow
12/20/2006; 9:04:44 AM (reads: 121, responses: 0)
Hi Mike,


I see that I missed this step, and it did the trick.


<| Post or View Comments |>

userSam Hathaway - How to upgrade database from from 2.1 to 2.2 (to 2.3)  blueArrow
12/20/2006; 11:36:49 AM (reads: 145, responses: 0)
Just to clarify slightly, when you upgrade to 2.3, you'll also need to run wwdb_check before running wwdb_upgrade. wwdb_check brings the database into a consistent state ("version 0") so that wwdb_upgrade can then do automatic upgrades. You only need to run wwdb_check when upgrading an existing database from version 2.1.x or 2.2.x to version 2.3.x. Once you've reached 2.3.x, wwdb_upgrade will be able to handle future database updates.

Ad-hoc database update scripts for 2.1.x and 2.2.x:
wwaddindexing - Add indexes to courses originally created with the sql database layout
wwdb_addgw - Add gateway testing fields to courses created with WeBWorK 2.2.x.

New upgrade scripts for 2.3.x:
wwdb_check - Bring database up-to-date for version 2.3.0. Run this only when upgrading from 2.1.x or 2.2.x to 2.3.x.
wwdb_upgrade - Run this when creating a new database for 2.3.x, after running wwdb_check, or when upgrading from an earlier version in the 2.3.x series.

Hope this helps.

<| Post or View Comments |>