Moodle
  1. Moodle
  2. MDL-6147

Upgrade from 1.5.x breaks with Postgres 7.4.x

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.6.2
    • Component/s: Installation
    • Labels:
      None
    • Environment:
      All
    • Database:
      PostgreSQL
    • Affected Branches:
      MOODLE_16_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE

      Description

      Even though Postgres 7.4.x is officially supported, several upgrade scripts use syntax that only works in Postgres 8.x. and it's impossible to finish the upgrade.

      The attached patch fixes those scripts.

      Saludos. Iñaki.

        Gliffy Diagrams

          Activity

          Hide
          Martin Dougiamas added a comment -

          From Petr Skoda (skodak at centrum.cz) Friday, 21 July 2006, 09:23 PM:

          assigning to MartinL

          From Jun Yamog (jun at catalyst.net.nz) Monday, 24 July 2006, 06:55 AM:

          Tested the patch on postgresql 7.4.13, I have modified it and removing the hotpot section. The hotpot author has detected the problem and fixed his module. I have made another patch file that will patch with the current moodle16_stable.

          Thanks Iñaki for catching and fixing this.

          From Eloy Lafuente (stronk7 at moodle.org) Monday, 24 July 2006, 11:00 PM:

          For reference: http://moodle.org/mod/forum/discuss.php?d=49304

          I really think this could be a good example to do in some Hackfest (test/commit/merge/commit)

          From Martin Langhoff (martin at catalyst.net.nz) Monday, 31 July 2006, 01:53 PM:

          Guys – committed to MOODLE_16_STABLE. Trying to apply it to HEAD, I am realising that there is something I don't quite agree with in the changes to mod/quiz/db/postgres.php. The changes are messing up the existing upgrade blocks.

          Why do we have that in the middle of the upgrade?

          From Iñaki Arenaza (iarenuno at eteo.mondragon.edu) Monday, 31 July 2006, 09:05 PM:

          Re: changes to mod/quiz/db/postgres.php, I'm not sure if the things you don't like are with the patch or the original code (your sentence is not that clear ).

          The mod/quiz/db/postgres.php patch moves the insertion of the prefix_question_attempts(id) values below the code that creates prefix_quiz_attempts(uniqueid). Previously the code tried to use the uniqueid column before it was actually added to the table. We get a nice SQL error

          Saludos. Iñaki.

          From Martin Langhoff (martin at catalyst.net.nz) Tuesday, 1 August 2006, 04:06 PM:

          Iñaki – actually, after discusssing it with Jun, the changes (moving the insert from one block to the other) are good but it shows up weird in the diff. Now, that isn't bad per-se, but it fails to apply against HEAD – and when I looked at the patch and compared it to HEAD nothing made any sense.

          Jun showed me today that it does make sense (thanks!) and that the reason it doesn't apply in HEAD is that there are some unmerged changes, apparently from Eloy. what we don't know is whether they are unmerged on purpose or by omission – I think they should be applied, but Eloy may have good reasons for skipping them.

          sorry about the confusion!

          From Jun Yamog (jun at catalyst.net.nz) Wednesday, 2 August 2006, 12:58 PM:

          I have removed the reordering of the insert with conflicts with head. Please review pgpatch2

          From Iñaki Arenaza (iarenuno at eteo.mondragon.edu) Wednesday, 2 August 2006, 06:46 PM:

          It looks good to me.

          Saludos. Iñaki.

          From Tim Hunt (T.J.Hunt at open.ac.uk) Thursday, 3 August 2006, 07:25 PM:

          Looks OK to me.

          It is a pity that it was not possible to do it all with table_column().

          Show
          Martin Dougiamas added a comment - From Petr Skoda (skodak at centrum.cz) Friday, 21 July 2006, 09:23 PM: assigning to MartinL From Jun Yamog (jun at catalyst.net.nz) Monday, 24 July 2006, 06:55 AM: Tested the patch on postgresql 7.4.13, I have modified it and removing the hotpot section. The hotpot author has detected the problem and fixed his module. I have made another patch file that will patch with the current moodle16_stable. Thanks Iñaki for catching and fixing this. From Eloy Lafuente (stronk7 at moodle.org) Monday, 24 July 2006, 11:00 PM: For reference: http://moodle.org/mod/forum/discuss.php?d=49304 I really think this could be a good example to do in some Hackfest (test/commit/merge/commit) From Martin Langhoff (martin at catalyst.net.nz) Monday, 31 July 2006, 01:53 PM: Guys – committed to MOODLE_16_STABLE. Trying to apply it to HEAD, I am realising that there is something I don't quite agree with in the changes to mod/quiz/db/postgres.php. The changes are messing up the existing upgrade blocks. Why do we have that in the middle of the upgrade? From Iñaki Arenaza (iarenuno at eteo.mondragon.edu) Monday, 31 July 2006, 09:05 PM: Re: changes to mod/quiz/db/postgres.php, I'm not sure if the things you don't like are with the patch or the original code (your sentence is not that clear ). The mod/quiz/db/postgres.php patch moves the insertion of the prefix_question_attempts(id) values below the code that creates prefix_quiz_attempts(uniqueid). Previously the code tried to use the uniqueid column before it was actually added to the table. We get a nice SQL error Saludos. Iñaki. From Martin Langhoff (martin at catalyst.net.nz) Tuesday, 1 August 2006, 04:06 PM: Iñaki – actually, after discusssing it with Jun, the changes (moving the insert from one block to the other) are good but it shows up weird in the diff. Now, that isn't bad per-se, but it fails to apply against HEAD – and when I looked at the patch and compared it to HEAD nothing made any sense. Jun showed me today that it does make sense (thanks!) and that the reason it doesn't apply in HEAD is that there are some unmerged changes, apparently from Eloy. what we don't know is whether they are unmerged on purpose or by omission – I think they should be applied, but Eloy may have good reasons for skipping them. sorry about the confusion! From Jun Yamog (jun at catalyst.net.nz) Wednesday, 2 August 2006, 12:58 PM: I have removed the reordering of the insert with conflicts with head. Please review pgpatch2 From Iñaki Arenaza (iarenuno at eteo.mondragon.edu) Wednesday, 2 August 2006, 06:46 PM: It looks good to me. Saludos. Iñaki. From Tim Hunt (T.J.Hunt at open.ac.uk) Thursday, 3 August 2006, 07:25 PM: Looks OK to me. It is a pity that it was not possible to do it all with table_column().
          Hide
          Martin Dougiamas added a comment -

          Just reviving this one as it was the last blocker for 1.6.2 in the old bug tracker:

          http://moodle.org/bugs/bug.php?op=show&bugid=6147

          Was this patch ever checked into MOODLE_16_STABLE and HEAD ? If not can someone do it?

          Show
          Martin Dougiamas added a comment - Just reviving this one as it was the last blocker for 1.6.2 in the old bug tracker: http://moodle.org/bugs/bug.php?op=show&bugid=6147 Was this patch ever checked into MOODLE_16_STABLE and HEAD ? If not can someone do it?
          Hide
          Martin Dougiamas added a comment -

          Jun? What's the status of this?

          Show
          Martin Dougiamas added a comment - Jun? What's the status of this?
          Hide
          Martín Langhoff added a comment -

          Passed on to Jun – he needs an acct here.

          Show
          Martín Langhoff added a comment - Passed on to Jun – he needs an acct here.
          Hide
          Jun Yamog added a comment -

          Hi Martin-s,

          Patch is already in. Martin put them in on MOODLE_16_STABLE, Skodak put them on HEAD.

          Show
          Jun Yamog added a comment - Hi Martin-s, Patch is already in. Martin put them in on MOODLE_16_STABLE, Skodak put them on HEAD.
          Hide
          Martin Dougiamas added a comment -

          Resolving this then. Iñaki can you confirm the fix so we can close this?

          Show
          Martin Dougiamas added a comment - Resolving this then. Iñaki can you confirm the fix so we can close this?
          Hide
          Iñaki Arenaza added a comment -

          I'll be off until Monday. I'll test it then and confirm/deny on Monday night.

          Saludos. Iñaki.

          Show
          Iñaki Arenaza added a comment - I'll be off until Monday. I'll test it then and confirm/deny on Monday night. Saludos. Iñaki.
          Hide
          Iñaki Arenaza added a comment -

          Later than I intended (I've been quite busy this week) but I have tested the fix for the upgrade. I can confirm that it works without trouble upgrading from latest 1.5.4+ to latest 1.6.1+.

          Saludos. Iñaki.

          Show
          Iñaki Arenaza added a comment - Later than I intended (I've been quite busy this week) but I have tested the fix for the upgrade. I can confirm that it works without trouble upgrading from latest 1.5.4+ to latest 1.6.1+. Saludos. Iñaki.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: