Upgrade errors

Upgrade errors

by Alistair Mitchell -
Number of replies: 15

I have just upgraded to 1.6, but have encountered a few database upgrade problems.

For example

calculated plugin needs upgrading

match plugin needs upgrading

Anybody any idea what is causing them|

 

Thanks

 

Alistair

Average of ratings: -
In reply to Alistair Mitchell

Re: Upgrade errors

by Alistair Mitchell -

As a result of these errors I can't get into any of the Admin functions apart fro variables.

The actual errors are:

calculated plugin needs upgrading


(mysql): CREATE TABLE mdl_question_calculated ( id int(10) unsigned NOT NULL auto_increment, question int(10) unsigned NOT NULL default '0', answer int(10) unsigned NOT NULL default '0', tolerance varchar(20) NOT NULL default '0.0', tolerancetype int(10) NOT NULL default '1', correctanswerlength int(10) NOT NULL default '2', correctanswerformat int(10) NOT NULL default '2', PRIMARY KEY (id), KEY question (question), KEY answer (answer)) TYPE=MyISAM COMMENT='Options for questions of type calculated'  


1050: Table 'mdl_question_calculated' already exists

         
      
   


Error

Installing calculated FAILED!


 


match plugin needs upgrading


(mysql): CREATE TABLE mdl_question_match ( id int(10) unsigned NOT NULL auto_increment, question int(10) unsigned NOT NULL default '0', subquestions varchar(255) NOT NULL default '', shuffleanswers tinyint(4) NOT NULL default '1', PRIMARY KEY (id), KEY question (question)) TYPE=MyISAM COMMENT='Defines fixed matching questions'  


1050: Table 'mdl_question_match' already exists

         
      
   


Error


(mysql): CREATE TABLE mdl_question_match_sub ( id int(10) unsigned NOT NULL auto_increment, code int(10) unsigned NOT NULL default '0', question int(10) unsigned NOT NULL default '0', questiontext text NOT NULL default '', answertext varchar(255) NOT NULL default '', PRIMARY KEY (id), KEY question (question)) TYPE=MyISAM COMMENT='Defines the subquestions that make up a matching question'  


1050: Table 'mdl_question_match_sub' already exists

         
      
   


Error

Installing match FAILED!


 


multianswer plugin needs upgrading


(mysql): CREATE TABLE mdl_question_multianswer ( id int(10) unsigned NOT NULL auto_increment, question int(10) unsigned NOT NULL default '0', sequence text NOT NULL default '', PRIMARY KEY (id), KEY question (question)) TYPE=MyISAM COMMENT='Options for multianswer questions'  


1050: Table 'mdl_question_multianswer' already exists

         
      
   


Error

Installing multianswer FAILED!


 


multichoice plugin needs upgrading


(mysql): CREATE TABLE mdl_question_multichoice ( id int(10) unsigned NOT NULL auto_increment, question int(10) unsigned NOT NULL default '0', layout tinyint(4) NOT NULL default '0', answers varchar(255) NOT NULL default '', single tinyint(4) NOT NULL default '0', shuffleanswers tinyint(4) NOT NULL default '1', PRIMARY KEY (id), KEY question (question)) TYPE=MyISAM COMMENT='Options for multiple choice questions'  


1050: Table 'mdl_question_multichoice' already exists

         
      
   


Error

Installing multichoice FAILED!


 


numerical plugin needs upgrading


(mysql): CREATE TABLE mdl_question_numerical ( id int(10) unsigned NOT NULL auto_increment, question int(10) unsigned NOT NULL default '0', answer int(10) unsigned NOT NULL default '0', tolerance varchar(255) NOT NULL default '0.0', PRIMARY KEY (id), KEY answer (answer), KEY question (question)) TYPE=MyISAM COMMENT='Options for numerical questions'  


1050: Table 'mdl_question_numerical' already exists

         
      
   


Error

Installing numerical FAILED!


 


randomsamatch plugin needs upgrading


(mysql): CREATE TABLE mdl_question_randomsamatch ( id int(10) unsigned NOT NULL auto_increment, question int(10) unsigned NOT NULL default '0', choose int(10) unsigned NOT NULL default '4', PRIMARY KEY (id), KEY question (question)) TYPE=MyISAM COMMENT='Info about a random short-answer matching question'  


1050: Table 'mdl_question_randomsamatch' already exists

         
      
   


Error

Installing randomsamatch FAILED!


 


rqp plugin needs upgrading


(mysql): CREATE TABLE mdl_question_rqp ( id int(10) unsigned NOT NULL auto_increment, question int(10) unsigned NOT NULL default '0', type int(10) unsigned NOT NULL default '0', source longblob NOT NULL default '', format varchar(255) NOT NULL default '', flags tinyint(3) unsigned NOT NULL default '0', maxscore int(10) unsigned NOT NULL default '1', PRIMARY KEY (id), KEY question (question)) TYPE=MyISAM COMMENT='Options for RQP questions'  


1050: Table 'mdl_question_rqp' already exists

         
      
   


Error


(mysql): CREATE TABLE mdl_question_rqp_servers ( id int(10) unsigned NOT NULL auto_increment, typeid int(10) unsigned NOT NULL default '0', url varchar(255) NOT NULL default '', can_render tinyint(2) unsigned NOT NULL default '0', can_author tinyint(2) unsigned NOT NULL default '0', PRIMARY KEY (id)) TYPE=MyISAM COMMENT='Information about RQP servers'  


1050: Table 'mdl_question_rqp_servers' already exists

         
      
   


Error


(mysql): CREATE TABLE mdl_question_rqp_states ( id int(10) unsigned NOT NULL auto_increment, stateid int(10) unsigned NOT NULL default '0', responses text NOT NULL default '', persistent_data text NOT NULL default '', template_vars text NOT NULL default '', PRIMARY KEY (id)) TYPE=MyISAM COMMENT='RQP question type specific state information'  


1050: Table 'mdl_question_rqp_states' already exists

         
      
   


Error


(mysql): CREATE TABLE mdl_question_rqp_types ( id int(10) unsigned NOT NULL auto_increment, name varchar(255) NOT NULL default '', PRIMARY KEY (id), UNIQUE KEY name (name)) TYPE=MyISAM COMMENT='RQP question types'  


1050: Table 'mdl_question_rqp_types' already exists

         
      
   


Error

Installing rqp FAILED!


 


shortanswer plugin needs upgrading


(mysql): CREATE TABLE mdl_question_shortanswer ( id int(10) unsigned NOT NULL auto_increment, question int(10) unsigned NOT NULL default '0', answers varchar(255) NOT NULL default '', usecase tinyint(2) NOT NULL default '0', PRIMARY KEY (id), KEY question (question)) TYPE=MyISAM COMMENT='Options for short answer questions'  


1050: Table 'mdl_question_shortanswer' already exists

         
      
   


Error

Installing shortanswer FAILED!


 


truefalse plugin needs upgrading


(mysql): CREATE TABLE mdl_question_truefalse ( id int(10) unsigned NOT NULL auto_increment, question int(10) unsigned NOT NULL default '0', trueanswer int(10) unsigned NOT NULL default '0', falseanswer int(10) unsigned NOT NULL default '0', PRIMARY KEY (id), KEY question (question)) TYPE=MyISAM COMMENT='Options for True-False questions'  


1050: Table 'mdl_question_truefalse' already exists

         
      
   


Error

Installing truefalse FAILED!
In reply to Alistair Mitchell

Re: Upgrade errors

by Christine Legemble -
I have the same errors with the "mdl_question_*" tables which already exist and which block the upgrade.
Did you discover a solution to this problem?
In reply to Alistair Mitchell

Re: Upgrade errors

by Alex Walker -

Exactly the same problem here (I started another thread here about it before I saw this one).  I have tried looking through the source files briefly but can't find where this stage occurs to look at changing the code so instead of creating the tables it alters them... or at least deletes them before recreating, but I hope to no have to do that!

Looks like I might be restoring to 1.5.4 sad

In reply to Alex Walker

Re: Upgrade errors

by Rick Phillips -
Has there been a resolution to this problem?  I am using 1.5.4+ and following the instructions, downloaded and unpacked 1.6+ and then carefully loaded all of the additional modules and filters that we are using in our current install.  I took special care to load only 1.6 compatible modules where they were available.  Some modules are now standard.  I then added our theme and our config file. repacked the "site" and sent it to the server.  Fortunately I have direct access to the server so I copied the moodle data file, exported the MySql DB, renamed the moodle folder and unpacked the new upload in its place.
I then started the web site up (externally and the upgrade seemed to be going nicely until I ran into the identical problems as outlined here.  Now, I believe I have conducted a "squeaky clean" upgrade and have been disappointed by the failure - even more so to find no answer here.
I am now back at version 1.5.4+ but am under pressure from my boss to get 1.6 running before Monday (school hols now) when the site will be very active again.
What can I do differently to make this work?  Full error report attached.
In reply to Alistair Mitchell

Re: Upgrade errors

by Carla Segura -

Hi everybody... I have the same problem sad. All the questionaire plugins can't be updated... some people talked about it in here...

I appreciate any help. Tnx.

Krla

In reply to Carla Segura

Re: Upgrade errors

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The workaround to this problem is:
  1. Take a backup.
  2. Do to upgrade, up until you get to these error messages.
  3. Go into you database, and look at the mdl_config table. You should see 10 rows with names like qtype_xxxxxx_version. You will probably find that all these rows have value 0.
  4. Change the value of all these rows to 2006032200.
  5. Go back to the admin page and resume the upgrade. It should now work.
In reply to Tim Hunt

Re: Upgrade errors

by Fig Newton -
The workaround worked as advertised. Went into the database via phpMyAdmin and sure enough the qtype_xxxxxx_version were set to '0' (except the first one, perhaps this is why the upgrade script is not catching the problem?).

After changing the values to 2006032200 the upgrade resumed as normal.

Fig
In reply to Tim Hunt

Re: Upgrade errors

by Dayron D -

I upgraded Moodle 1.54 to 1.61 today (after upgrading so my PHP and MySQL would meet the requirements) and ran into the same issue. I followed the steps given and the work-around worked like a champ.

 

In reply to Alistair Mitchell

Re: Upgrade errors

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi,

all the reports in this page show messages of this type:

Table 'XXXXX' already exists

obviously, it means that table XXXXX has been created and now it's failing to be created once more.

The first question I have about this problem is if the reports you've sent here belongs to the FIRST time you've arrived to the question-plugins installation page or if such reports are AFTER pressing the continue button the first time. Could you confirm that? And, if possible, send the output of the FIRST time?

Obviously you should begin with your original 1.5.x version in order to do it properly.

More yet, could be possible, for any of you to send one MySQL compressed dump of your 1.5.x site (before upgrade?) privately? I've been testing the upgrade and I haven't been able to reproduce the problem here.

TIA, ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Upgrade errors

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hmmm ... I've upgraded about 20 sites to 1.6 and never come across this problem ...
In reply to Martin Dougiamas

Re: Upgrade errors

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
This is bug 6021.
In reply to Tim Hunt

Re: Upgrade errors

by Mostafa Itani -

Hello Tim,

I did delete the tables that were already existing like
mdl_questions_calculated
mdl_questions_match

and everything worked fine.

Now I am stuck users can not more see the courses they are enrolled in. Seems the enrollment is not working anymore. I was using the LDAP enrolment in addition to the internal one.

Any help?

Regrads,

Mostafa

In reply to Eloy Lafuente (stronk7)

Upgrading Database error on new install

by Nick Meyer -
Hi, I'm having trouble with the install hanging on "Upgrading Databases" and this is a new Moodle install. Has anyone found the source of the problem? I'm running
  • Moodle 1.6.1 (2006050510)
  • MySQL - 5.0.22-Debian_3-log
  • PHP Version 4.3.10
  • Apache/1.3.33 Server at lincenglish.com
From a blank install I click through the setup pages and after populating tables, the install just quits with a partial HTML page. I tried changing the mdl_config table version numbers; this restarted the install but it still hung again after updating tables. Thanks for any quick help!
In reply to Nick Meyer

Re: Upgrading Database error on new install

by Steve Bilton -
Hello Nick,

I have been having the same troubles on a new install of 1.6.1 and 1.6.1+.
My host uses php 4.4.2 and 5 php with a 5.0.22 and a 4.1.2 (tried both) MySQL on a Zuse 4.3, i'm using namesco as a host, maybe its' incompatabilities.
Oh one more thing do you use a romote database or a @localhost database. That is the only difference i can see as i have a working version of 1.6.1 on another host server.

I get a halt when creating LAMS tables (successful) then no option to continue. I // commented out the nusoap.php call to function and it moved on to the next table creation (lesson) but then stopped after successful creation of that too. I've tried many many things to fix this (changing php.ini, .htaccess, /lib/setup.php) but havent come accross any that have worked so far. Bit of a nightmare really as i've been working on it for over a week.

I did however manage to get a MySQL error using explain and it pointed out a syntax error, which i'm not sure how to fix that is:

MySQL ERROR:

mysql> explain CREATE TABLE mdl_lams (  id int(10) unsigned NOT NULL auto_increment,  course int(10) unsigned NOT NULL default '0',  name varchar(255) NOT NULL default '',  introduction text NOT NULL default '',  learning_session_id bigint(20) default '0',  timemodified int(10) unsigned NOT NULL default '0',  PRIMARY KEY  (id),  KEY course (course))COMMENT='LAMS activity';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE mdl_lams (  id int(10) unsigned NOT NULL auto_increment,  course in' at line 1

Maybe this will help you?
I might have to file a bug report on this as i can't find any way of fixing so far. But its so vauge i'm not sure what to file it under exactly.
I also have a log report from the host server that is:
Last 2 queries run (both successful):

CREATE TABLE mdl_lams (  id int(10) unsigned NOT NULL auto_increment,
course int(10) unsigned NOT NULL default '0',  name varchar(255) NOT NULL
default '',  introduction text NOT NULL default '',  learning_session_id
bigint(20) default '0',  timemodified int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (id),  KEY course (course))COMMENT='LAMS activity'

INSERT INTO mdl_modules ( NAME, VERSION, CRON ) VALUES ( 'lams', 2005062800,
0 )
Halts here!

Good luck Nick i hope this informs you somemore and if i find a solution i'll post it to you on here.
I'd really appriciate some help on this if anybody has any ideas.

Thanks
Steve
www.sheilds.org