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

Change Oracle generator to use getSequenceFromDB and getTriggerFromDB instead of getNameForObject

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8
    • Component/s: Unknown
    • Labels:
      None
    • Environment:
      Oracle DB
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      Similar to the getSequenceFromDB($xmldb_table) function, that's is being used to get the proper sequence name for each table under Oracle (insert_record), create one Oracle getTriggerFromDB($xmldb_table) function, to be used EXCLUSIVELY INTERNALLY by the oci8po generator in order to get the correct trigger name for one table.

      Both functions will be used when renaming, dropping... fields and tables instead of current uses of getNameForObject() because some problems can arrive with some "similar named" elements like "question_multichoice" and "question_multianswer" having their names wrongly calculated by such function on rename or drop.

      This doesn't seem to be urgent because that tables are the only ones presenting potential conflicts and they seem to be really stable under Moodle, so we'll implement this for Moodle 1.8.

      Note that this will force to overload some more methods (all those involved with table/field drop/renaming) in the oci8po, in order to be able to get the object names before dropping the table.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Tester:
              Nobody
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                31/Mar/07