Git Product home page Git Product logo

Comments (2)

jpahullo avatar jpahullo commented on September 4, 2024

This issue has been resolved by correct configuration of the plugin in the last version of this plugin.

The idea behind that is all cases the same:

Context

We have an olduserid and a newuserid. The olduserid is related to a user to be replaced by the user related to newuserid. In other words, all records related to olduserid will be presented as if they were performed by newuserid.

In some database tables, there are indexes that are compound by several fields (now on compound indexes) relating at lest a user-friendly field. Actually, we have only found compound indexes made by two fields. And in some cases, both fields are user-friendly.

How does the plugin process compound indexes?

Let us suppose the following scenario in a given database table with an identified case of compound index:

  1. If the table has a record where only the olduserid value appears, the plugin simply replaces the olduserid value by the newuserid without conflict, like in the rest of normal cases.
  2. If the table only has cases on which a record appears with only the newuserid value on, the plugin simply ignores that case. The database table already presents the value we expect.
  3. If the table has for a given compound index value both the olduserid and newuserid values, the plugin realizes the following:
    1. Deletes the records related to olduserid for conflicting cases on compound indexes if they were replaced with the newuserid value.
    2. We leave with no change the records related to newuserid. We assume that, given the olduserid has to disappear and that it is older than the newuserid, the related records of newuserids are equivalent to the records from olduserid. In other words, the person related to the given olduserid and newuserid has made the same "job" for both olduserid and newuserid.

Let you check how it works just now 👍

from moodle-tool_mergeusers.

ndunand avatar ndunand commented on September 4, 2024

Hi Jordi,
Indeed, I think your assumption (3.ii.) is correct, and that solved the problem. Brillant!

from moodle-tool_mergeusers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.