Legacy Database Problems

Legacy Database Problems

by Stephen Hooley -
Number of replies: 1

Hi

(I'm reposting this from the installation problems forum)

I have a Moodle system which started life wayback as a 1.4 system. It's been through various upgrades and is currently version 1.9.12.

I am having problems upgrading to version 2 and as part of narrowing down the problem I've compared my current 1.9.12 (that has been upgraded from 1.4) database to a fresh install of 1.9.12 and found there are a lot of differences that must have occured during the numerous updates.

I realise this is probably not the cause of my problems upgrading to Moodle 2 but I want to bring things in-line with where they should be. I have corrected most of the issues, mainly field type changes but have found some of the key names are completely different for example:

Table: mdl_user

Current updated 1.9.12 keys

KEY user_deleted (deleted),
KEY user_confirmed (confirmed),
KEY user_lastaccess (lastaccess),
KEY auth (auth),
KEY user_firstname (firstname),
KEY user_lastname (lastname),
KEY user_email (email),
KEY user_city (city),
KEY user_country (country),
KEY mdl_user_idn_ix (idnumber)

New install 1.9.12

KEY mdl_user_del_ix (deleted),
KEY mdl_user_con_ix (confirmed),
KEY mdl_user_fir_ix (firstname),
KEY mdl_user_las_ix (lastname),
KEY mdl_user_cit_ix (city),
KEY mdl_user_cou_ix (country),
KEY mdl_user_las2_ix (lastaccess),
KEY mdl_user_ema_ix (email),
KEY mdl_user_aut_ix (auth),
KEY mdl_user_idn_ix (idnumber)

I'm not that familar with MYSQL keys, will this cause problems going forward and what is the best way of updating the keys so that they match a new 1.9.12 installation? Can I simply delete the old keys and recreate them for each table or will this cause problems?

One suggestion (thanks Colin) has been to move the data to a fresh install which might be the best solution.

Thanks in advance

Steve

Average of ratings: Useful (1)