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

Add missing foreign keys to analytics tables

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 3.4
    • Component/s: Analytics
    • Labels:
    • Testing Instructions:
      Hide
      Before upgrade.
      1. Create a site.
      2. Update to latest integration and go through the update.
      3. Check the diff.
      4. Check the database tables contain the indexes that were added.
      Fresh install
      1. Create a fresh installed site using latest integration.
      2. Confirm the database structure for the analytics_* tables is the same as the upgraded one.
      Show
      Before upgrade. Create a site. Update to latest integration and go through the update. Check the diff. Check the database tables contain the indexes that were added. Fresh install Create a fresh installed site using latest integration. Confirm the database structure for the analytics_* tables is the same as the upgraded one.
    • Affected Branches:
      MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-59904_master

      Description

      From Eloy - Important note: While looking to the database model, trying to understand samples and friends... I found a good number of columns within the analytics code that are missing foreign key declarations. Basically EVERY column pointing to another table (modelid, sampleid, contextid, fileid...) MUST HAVE a foreign key pointing to the the master table (models, samples, contexts, files...). Internally that means that USEFUL INDEXES will be created and we'll have a BETTER DEFINED MODEL, no matter we don't create the FKs yet.

        Attachments

          Activity

            People

            Assignee:
            markn Mark Nelson
            Reporter:
            markn Mark Nelson
            Peer reviewer:
            David Monllaó
            Integrator:
            Jun Pataleta
            Tester:
            Ankit Agarwal
            Participants:
            Component watchers:
            Elizabeth Dalton, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Nov/17