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

Oracle: 2.9.3+ to 3.1+ upgrade fails with "Dependency found with index" error, but index doesn't seem to exist?

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1
    • None
    • General
    • MOODLE_31_STABLE
    • Easy

    Description

      I'm in the process of upgrading our Moodle test box (2.9.3+) to 3.1+, and the upgrade stops shortly after starting with the error:

      column "tag_instance->itemtype" cannot be modified. Dependency found with index "m_taginst_iteitetag_uix (itemtype, itemid, tagid)"
      

      I saw other tracker issues reporting similar-ish problems with other upgrades, which suggested removing the index until the upgrade was completed. However, I can't see the index listed, even when logging in as sys/sysdba?

      -- Create table
      create table MOODLE2USER.M_TAG_INSTANCE
      (
        id           NUMBER(10) not null,
        tagid        NUMBER(10) not null,
        itemtype     VARCHAR2(255 CHAR) default ' ' not null,
        itemid       NUMBER(10) not null,
        tiuserid     NUMBER(10) default 0 not null,
        ordering     NUMBER(10),
        timemodified NUMBER(10) default 0 not null,
        component    VARCHAR2(100 CHAR) not null,
        contextid    NUMBER(10),
        timecreated  NUMBER(10) default 0 not null
      )
      tablespace MOODLEPROD
        pctfree 10
        initrans 1
        maxtrans 255
        storage
        (
          initial 64K
          next 1M
          minextents 1
          maxextents unlimited
        );
      -- Add comments to the table 
      comment on table MOODLE2USER.M_TAG_INSTANCE
        is 'tag_instance table holds the information of associations between tags and other items';
      -- Create/Recreate indexes 
      create index MOODLE2USER.M_TAGINST_CON_IX on MOODLE2USER.M_TAG_INSTANCE (CONTEXTID)
        tablespace MOODLEPROD
        pctfree 10
        initrans 2
        maxtrans 255
        storage
        (
          initial 64K
          next 1M
          minextents 1
          maxextents unlimited
        );
      create index MOODLE2USER.M_TAGINST_TAG_IX on MOODLE2USER.M_TAG_INSTANCE (TAGID)
        tablespace MOODLEPROD
        pctfree 10
        initrans 2
        maxtrans 255
        storage
        (
          initial 64K
          next 1M
          minextents 1
          maxextents unlimited
        );
      -- Create/Recreate primary, unique and foreign key constraints 
      alter table MOODLE2USER.M_TAG_INSTANCE
        add constraint M_TAGINST_ID_PK primary key (ID)
        using index 
        tablespace MOODLEPROD
        pctfree 10
        initrans 2
        maxtrans 255
        storage
        (
          initial 64K
          next 1M
          minextents 1
          maxextents unlimited
        );
      

      Debug info:
      Error code: ddldependencyerror
      Stack trace:

      line 732 of /lib/ddl/database_manager.php: ddl_dependency_exception thrown
      line 589 of /lib/ddl/database_manager.php: call to database_manager->check_field_dependencies()
      line 1227 of /lib/db/upgrade.php: call to database_manager->change_field_type()
      line 1682 of /lib/upgradelib.php: call to xmldb_main_upgrade()
      line 501 of /admin/index.php: call to upgrade_core()

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              smily03 Chris Myers
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: