Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-30365

Upgrading from early 1.9.x to 2.1.2+ fails on null records

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.1.2
    • Installation
    • PostgreSQL
    • MOODLE_21_STABLE
    • Hide

      Install a clean Moodle - 1.9.14+ (Build: 20111118)
      Alter user table - lastip to replicate the situation with the clients DB

      • alter table mdl_user alter lastip drop not null;
      • update mdl_user set lastip=null;

      Run the upgrade process on 2.1.2+ (Build: 20111118)

      ++ Increasing size of user idnumber field, this may take a while... ++
      Default exception handler: DDL sql execution error Debug: ERROR: column "lastip" contains null values
      ALTER TABLE mdl_user ALTER COLUMN lastip SET NOT NULL

      Show
      Install a clean Moodle - 1.9.14+ (Build: 20111118) Alter user table - lastip to replicate the situation with the clients DB alter table mdl_user alter lastip drop not null; update mdl_user set lastip=null; Run the upgrade process on 2.1.2+ (Build: 20111118) ++ Increasing size of user idnumber field, this may take a while... ++ Default exception handler: DDL sql execution error Debug: ERROR: column "lastip" contains null values ALTER TABLE mdl_user ALTER COLUMN lastip SET NOT NULL

      We have tested upgrading some clients from 1.9.6 to 2.1.2+ who started out with early 1.9.x code which have null records in these fields :-

      User: 'icq', 'skype', 'yahoo', 'aim', 'msn', 'phone1', 'phone2', 'institution', 'department', 'address', 'city', 'country', 'lastip', 'secret'
      Resource: 'reference'

      Solution is run this attached pre-upgrade script.

      Please review and consider for future upgrade code.

            moodle.com Moodle HQ
            tlock Tim Lock
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.