Page MenuHomePhabricator

Fix duplicated enrollments in database
Closed, ResolvedPublic


Due to we have some accounts that have duplicated enrollments in the DB. Find and fix them by reviewing the output of SELECT uuid,start,end,organization_id FROM enrollments WHERE uuid IN (SELECT uuid FROM enrollments GROUP BY uuid HAVING COUNT(uuid) > 1) ORDER BY uuid,start;

Event Timeline

In theory done:

   f44cdb9..50e1ccc  master -> master

In practice let's see after the next owlbot activity.

Also added the SQL query to

Aklapper changed the task status from Open to Stalled.Sep 29 2017, 8:13 PM
Aklapper lowered the priority of this task from Medium to Low.

List is shorter than expected btw:

sortinghat withdraw 025124bdf0ea09267b3a6fddca2ae4552dd44a4d "Wikimedia Foundation"
sortinghat withdraw 025124bdf0ea09267b3a6fddca2ae4552dd44a4d "Independent"
sortinghat withdraw 0ce8b7c58618f160caba607945d4f53bb0ac6f7d "Wikimedia Deutschland"
sortinghat withdraw 0f5aad639624b5a1870b58271ccd44ecefada689 "Independent"

I reviewed the SQL query output based on the latest DB dump (git id d357d21754988e610ac31a906d42dd234bb821a7 from 20170930). I have covered all duplicated enrollments in the proposed changes (=a list of sortinghat commands in a bash script) I posted in (non-public) and asked Bitergia to merge my proposed changes, as things are broken in which do not allow me to push changes myself without getting them overwritten by owlbot currently.

The query is listed on so I can repeat this exercise regularly.

Though the production DB does not reflect those fixes yet, there is nothing left to do in this task for the time being - just waiting for Bitergia to merge my changes.

Closing task as resolved.