## WeBWorK Main Forum

### Upgrading webwork and transferring courses.

by Andrew Doe-stien -
Number of replies: 3
Hello all-

I installed webwork in 2004, and it worked great. We got a new machine, so I decided to use the latest version of WW. The previous version was 2.1

I've gotten it all installed, but I'm having trouble bringing over the old classes to the new system (the Professors have classes they re-use every semester with the problem sets already chosen). I used the SQL_SINGLE class type for the courses, and even after running a wwdb_upgrade/wwdb_check until it doesn't complain anymore, I end up with:

DBD::mysql::st execute failed: Unknown column 'merge1.problems_per_page' in 'field list' at /opt/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 665.

(I pasted the call stack below)

Am I missing something obvious? Backing up and restoring the DB using the in-site links in the "Course administration" page doesn't work either, yielding many messages like:

set_user record with user_id='wertz' set_id='webwork08': DBD::mysql::st execute failed: Unknown column 'hide_score' in 'field list' at /opt/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 665.

Any suggestions?

TIA-

Andrew

### Call stack

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

• in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 198 of /opt/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Merge.pm
• in WeBWorK::DB::Schema::NewSQL::Merge::_get_fields_where_prepex called at line 232 of /opt/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
• in WeBWorK::DB::Schema::NewSQL::Std::get_fields_where called at line 292 of /opt/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
• in WeBWorK::DB::Schema::NewSQL::Std::get_records_where called at line 592 of /opt/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
• in WeBWorK::DB::Schema::NewSQL::Std::gets called at line 1065 of /opt/webwork2/lib/WeBWorK/DB.pm
• in WeBWorK::DB::getMergedSets called at line 141 of /opt/webwork2/lib/WeBWorK/ContentGenerator/ProblemSets.pm
• in WeBWorK::ContentGenerator::ProblemSets::body called at line 152 of /opt/webwork2/lib/WeBWorK/Template.pm
• in WeBWorK::Template::template called at line 486 of /opt/webwork2/lib/WeBWorK/ContentGenerator.pm
• in WeBWorK::ContentGenerator::content called at line 194 of /opt/webwork2/lib/WeBWorK/ContentGenerator.pm
• in WeBWorK::ContentGenerator::go called at line 353 of /opt/webwork2/lib/WeBWorK.pm

### Re: Upgrading webwork and transferring courses.

by Gavin LaRose -
Hi Andrew,

Did you run wwdb_upgrade after upgrading WeBWorK? It sounds as if your database is still in an older version. Between version 2.1 and 2.4.5 a lot of functions got built in that require additional columns in a number of database tables, which these error messages suggest are missing in your webwork database.

Gavin

### Re: Upgrading webwork and transferring courses.

by Andrew Doe-stien -
Gavin,

Database is up-to-date at version 23.

Is that correct?

Regards,
Andrew

### Re: Upgrading webwork and transferring courses.

by Michael Gage -
Automatic upgrading of the database entries for old courses is not easy and the current wwdb_upgrade is not foolproof. We are working to improve the robustness for the next release. Because of this make sure that you use the rel-2-4-patches release of wwdb_upgrade