Migrate Questionnaire Activity (Moodle 2.8.8 > Moodle 3.1)

Migrate Questionnaire Activity (Moodle 2.8.8 > Moodle 3.1)

by Peter Holman -
Number of replies: 2

I'm trying to backup courses from Moodle 2.8.8 (Questionnaire 2014111004) and restore to Moodle 3.1 (Questionnaire 2016020203).

During the restore an "error writing to database" occurs.

What is the best way to proceed with the migration? as far as I can see my only option is to first upgrade the 2.8.8 instance of Moodle to 3.1 then upgrade the modules (inc Questionnaire). After the current instance has been upgraded the migration should go smoothly as it takes place over consistent versions.

I can't currently upgrade the current instance 2.8.8 to 3.1 in its current state and am looking for an alternative way to get around this problem.


Average of ratings: -
In reply to Peter Holman

Re: Migrate Questionnaire Activity (Moodle 2.8.8 > Moodle 3.1)

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Peter -

I believe that "should" work. Any chance you could provide me a copy of the backup file that is failing so I can test and see where the problem might be?

mike

In reply to Mike Churchward

Re: Migrate Questionnaire Activity (Moodle 2.8.8 > Moodle 3.1)

by Peter Holman -

Hi Mike,

Thanks for your reply, I've found an easier solution, on closer look I found the problem was due to an attempt to insert a null value in the mdl_questionnaire_survey table > feebackscores column.

The column is set to "not null" and has a default value of '0' but the null constraint was still raising an error due to the code explicitly inserting a null value. 

For now I have allowed null values for the column.

We are in the middle of migrating approx. 4,500 courses from Moodle 2.8.8 to a new 3.1 instance, after the migration is complete I will reapply the null constraint.


Once again many thanks for your reply.