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

Add Moodle 2.2.0 upgrade line to all the upgrade.php scripts

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.2, 2.3
    • 2.2.1
    • Installation
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • MOODLE_22_STABLE
    • MDL-30604_m23
    • Easy
    • Hide

      1) find . -name upgrade.php | xargs grep -B2 'return true;' check all upgrade scripts have at least one upgrade line. Exception! the change to enrol/guest/db/upgrade.php has the comments before 2011112901 that has been created this weel.
      2) check that the 3 commands in the description of the issue return 0 files.

      Show
      1) find . -name upgrade.php | xargs grep -B2 'return true;' check all upgrade scripts have at least one upgrade line. Exception! the change to enrol/guest/db/upgrade.php has the comments before 2011112901 that has been created this weel. 2) check that the 3 commands in the description of the issue return 0 files.

    Description

      In order to have it properly detected for the future it would be great to add to all the upgrade.php scripts some lines like these:

      // Moodle v2.2.0 release upgrade line
      // Put any upgrade step following this

      exactly before the "return true;" present in all the scripts.

      I think it's ok to do that both in the 22_STABLE and master branches, so they will allow quickly find where 2.2.0 started and act once we decide future requirements.

      Command to detect all the upgrade.php files not having those lines:

      find . -name upgrade.php | xargs grep -l 'function.*xmldb_.*_upgrade' | grep '/db/' | xargs grep -L 'Moodle v2.2.0 release upgrade'

      Commands to detect that we have not added the lines to incorrect files:

      grep -lr 'Moodle v2.2.0 release upgrade' * | grep -v '/db/'
      grep -lr 'Moodle v2.2.0 release upgrade' * | xargs grep -L 'function.*xmldb_.*_upgrade'

      Ciao

      Attachments

        Issue Links

          Activity

            People

              nebgor Aparup Banerjee
              stronk7 Eloy Lafuente (stronk7)
              Rossiani Wijaya Rossiani Wijaya
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Jan/12