Get errors when upgrading from 2.4.7+ to 2.8.7+

Get errors when upgrading from 2.4.7+ to 2.8.7+

by Phuong Hoang -
Number of replies: 8

I have been attempting to update my site from 2.4.7+ to stable 2.8.7+. Unfortunately, I got this error:

quiz slots error

Is there something about the quiz module that is preventing my update? What can I do to finally get my site updated to 2.8?

I highly appreciate any suggestion

Thanks in advance,


Average of ratings: -
In reply to Phuong Hoang

Re: Get errors when upgrading from 2.4.7+ to 2.8.7+

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Sounds like you had a failed upgrade at some point.

Two options -

1.  Restore everything (including database) back to before upgrade and try again.

2.  Rename quiz_slots table to quiz_slots_old and then try again.

Emma

In reply to Emma Richardson

Re: Get errors when upgrading from 2.4.7+ to 2.8.7+

by Phuong Hoang -

Thank you for your suggestion,

I tried at least 3 times but all failed. Honestly, I search my times but can't find the table called quiz_slots. Can you help me how to find the table called quiz_slots?

Thank you

In reply to Phuong Hoang

Re: Get errors when upgrading from 2.4.7+ to 2.8.7+

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

The table is in the database.

In reply to Emma Richardson

Re: Get errors when upgrading from 2.4.7+ to 2.8.7+

by Phuong Hoang -

Yeah! Ma'am,

Certainly, I know "The table is in the database". I mean that I search and I can't find the table called quiz_slots in my database. There appear to be no quiz_slots in my database.

In reply to Phuong Hoang

Re: Get errors when upgrading from 2.4.7+ to 2.8.7+

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Sorry about that - wasn't sure what you were asking.  I just realized that I did not look at the error totally and missed the ddl table reference.  Try the following that I pulled from where  I answered another post like this:

Go into your database and rename ALL of the qtype tables that might exist to qtype_randomsamatch_options_old, for example.  Or make a copy and then delete.  Just make sure that you have a copy of them.

Then rerun the upgrade, which should complete normally.  Then, go back to the database, and check that all tables were recreated.  If any are missing, rename the old table back to the correct name and you should be good to go.

Check your installation by making sure that you can open and edit questions of all different question type.


Average of ratings: Useful (1)
In reply to Emma Richardson

Re: Get errors when upgrading from 2.4.7+ to 2.8.7+

by Phuong Hoang -

Thanks Emma a lot,

Finally, I upgraded my site successfully. It was a struggle because I had to rename many tables such as; qtype_ and tool_monitor_. And now I see in my database having a lot of _old tables. I wonder whether this way will affect my site in the future or not. Should I drop all old tables?

Plz have a look at my database

table 1

And

old table 02

+ It looks like a mess!

Thanks again,

In reply to Phuong Hoang

Re: Get errors when upgrading from 2.4.7+ to 2.8.7+

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Ok, so what you need to do now is verify everything is working correctly.  You need to go into a question of each type and verify that you can edit them.  That will show you that the data has transposed to the new table correctly.

Also check your tool monitor as well.

Once you have verified that the data has come into the new table (you can also open the new tables and verify the data is there but I recommend checking functionality too), you can delete the old ones.

For any ones that have not created a new table (off the top of my head I see ddmarker_drops) just rename the old table back to its original name.  (This might not have been created because you don't have any questions of this type but occasionally the table will not recreate properly so this method ensures that you don't lose any of your questions)

Average of ratings: Useful (1)
In reply to Emma Richardson

Re: Get errors when upgrading from 2.4.7+ to 2.8.7+

by Phuong Hoang -

I do as you told me. Everything seems to work correctly up to now. However, I wonder whether my site will work correctly or not in the future. And I'm also afraid that I'll get errors like this when upgrading higher versions.angry

Thanks Emma so much again,