Slightly confused about upgrade process from 1.6 to 1.9

Slightly confused about upgrade process from 1.6 to 1.9

删除的用户 -
回帖数:6

I'm currently using 1.6.4 and want to upgrade to 1.9

I was reading thru the upgrade procedures, and I found it a little confusing as to what I should actually be doing:

Q1 - Where do I find this "utf8 migration tool" so I can upgrade my database?

Q2 - After I migrate my db to utf8, can I then upgrade directly to 1.9, or do I need to upgrade to 1.7 then 1.8 then 1.9?

Thanks

回复删除的用户

Re: Slightly confused about upgrade process from 1.6 to 1.9

Richard Enison -
JS,
  1. The db migration tool is available in the administration menu of Moodle 1.6 and 1.7 only.
  2. It is best for several reasons to upgrade Moodle one major version at a time. So upgrade from 1.6 to 1.7, then to 1.8, finally to 1.9. It doesn't matter whether you do the db migration in 1.6 or 1.7. Utf8 is optional in 1.6 and 1.7 and required by 1.8 and higher, and by the time you get there the migration tool is no longer available.
RLE
回复Richard Enison

Re: Slightly confused about upgrade process from 1.6 to 1.9

删除的用户 -

Richard Enison wrote "The db migration tool is available in the administration menu of Moodle 1.6 and 1.7 only"

I don't see anything in the Admin Menu that has to do with this db migration. I'm using 1.6.4. I do have the phpMyAdmin database module installed, but I don't see anything in phpMyAdmin that would do this either.

Am I looking for some command or link that has the word 'migrate' in it? I'm not seeing it, even logged in as the main admin user. I think I searched thru all the sub-menus of the admin menu as well!

Am I just missing it? Should it be in the top level part of the admin menu? Is it hidden down a few levels?

Any help to find it would be greatly appreciated!

Thanks

回复删除的用户

Re: Slightly confused about upgrade process from 1.6 to 1.9

删除的用户 -

I think I solved my own problem... it appears the reason the migration tool doesn't show up, is because everything is already utf8!!!

In the config.php file it says: $CFG->unicodedb = true;  // Database is utf8

From what I read in some other forum posts, I think you need to set the above variable back to FALSE if you want the migration tool to show up on your admin menu.

I also checked my db and table structures manually and found this:

DB has collation: utf8_unicode_ci

Almost all tables in DB have collation: utf8_general_ci

All fields in most tables have collation: utf8_general_ci

So it looks like everything in the db is mostly migrated!

There are however 8 tables that have a different collation. The 8 tables all start with the name mdl_pma_xyz. They have a collation of utf8_bin instead of utf8_general_ci.

Do you think I show ALTER the collation of these tables to the utf8_general_ci before proceeding with the upgrade? Or do you think they are okay as is, since they are a utf8 format already?

Thanks for your responses!

回复删除的用户

Re: Slightly confused about upgrade process from 1.6 to 1.9

Petr Skoda -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像
Hello,

the pma_ tables are used by phpMyAdmin only, you can ignore them because they do not contain any important data - I guess they can be deleted if there is a problem and they would be recreated automatically.

Petr
回复删除的用户

Re: Slightly confused about upgrade process from 1.6 to 1.9

Richard Enison -
JS,

Congratulations! I believe you are right about solving your own problem. But let's clear up a few loose ends:
  1. It is true that the $CFG->unicodedb is set to true automatically when the Unicode migration script is run; maybe also when it is found to be Unicode-compliant already. However, sometimes people set this variable to true or false manually in order to force Moodle to act as if the db is or is not Unicode-compliant. This can cause problems if the flag is set contrary to the facts.
  2. PS might be right about the pma tables. The fact is, it doesn't matter in your case, because in your db they are still utf8. It doesn't matter that the collation is utf8_bin instead of utf8_general_ci, as long as the character set is utf8 (I'm pretty sure!).
  3. The doc that describes the db migration process is http://docs.moodle.org/en/Upgrading_to_Moodle_1.6#Database_migration. It says the link to it is at the top of the admin page. Perhaps I mis-spoke when I said it was on the admin menu.
  4. If you did have some tables that were not utf8, you could change their default character set and collation with the ALTER TABLE query, but if they had any data in them, I don't know if that would convert the data itself. I believe that is why the db migration script is needed. But in your case, you don't seem to need it.
  5. You wouldn't find the db migration script in phpMyAdmin; it is a Moodle script. phpMyAdmin comes with MySQL and has nothing to do with Moodle, although you can run it under Moodle as a module. The db migration tool, it seems, only works with MySQL db's. There is a separate procedure for PostgreSQL db's; see http://docs.moodle.org/en/UTF-8_PostgreSQL.
RLE
回复Richard Enison

Re: Slightly confused about upgrade process from 1.6 to 1.9

删除的用户 -

Thanks Richard and Petr...

I will now move forward with the upgrades, one version at a time, and hoepfully I will have no problems!!!