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

DB differences found (defaultmark & maxmark) between installed & upgraded 2.1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Environment:
      MySQL
    • Database:
      MySQL
    • Testing Instructions:
      Hide
      • Install Moodle 2.0.x on MySQL
      • TEST: Verify question->defaultgrade is unsigned=true
      • TEST: Verify quiz_question_statistics->maxgrade is unsigned=false
      • Upgrade to 2.1beta
      • TEST: Verify question->defaultmark is unsigned=true
      • TEST: Verify quiz_question_statistics->maxmark is unsigned=false
      • TEST: Run DB functional tests for MySQL. They all should pass (but the collation related ones in case the DB isn't properly set).
      Show
      Install Moodle 2.0.x on MySQL TEST: Verify question->defaultgrade is unsigned=true TEST: Verify quiz_question_statistics->maxgrade is unsigned=false Upgrade to 2.1beta TEST: Verify question->defaultmark is unsigned=true TEST: Verify quiz_question_statistics->maxmark is unsigned=false TEST: Run DB functional tests for MySQL. They all should pass (but the collation related ones in case the DB isn't properly set).
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      unsigned_fixes

      Description

      Fix DB differences in question->defaultmark and quiz_question_statistics->maxmark between installed & upgraded Moodle 2.1

      Pasted from MDL-27929:

      About question->defaultmark, it seems to be unsigned = true, both in install.xml and in its history in upgrade.php (comes from question->defaultgrade that always was unsigned). So I think we need to fix upgrade.php making it unsigned.

      About quiz_question_statistics->maxmark, it seems to be unsigned = false in install.xml (and also another question_attempts->maxmark is unsigned=false). And in upgrade, we can find both situations, but @ 2008112102 the previous column (maxgrade) was changes explicity to unsigned = false. So I think we need to fix upgrade.php making it signed.

      So, in summary, we need to add one more step to upgrade to:

      1) modify question->defaultmark to unsigned = true:
      2) modify quiz_question_statistics->maxmark to unsigned = false;

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stronk7 Eloy Lafuente (stronk7)
                Reporter:
                stronk7 Eloy Lafuente (stronk7)
                Integrator:
                Sam Hemelryk
                Tester:
                Sam Hemelryk
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta, Ryan Wyllie
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  1/Jul/11