Closed SideonDeaka closed 5 years ago
A function has been created to solve some of this, at least for a temporary solution. checkUserExistsForUserPrograms() needs to be run on production, and that database sucked down to dev and local. We can then call this function whenever a user is deleted in WP_users page, as when a user id is gone, we must refactor the cura_user_programs table, or we will have empty object errors.
@SideonDeaka lets keep this open for now. I am sure we will find more things we need to clean up.
Closed, Duplicate of #55
Nathan, we need to go through and clean up all of the bad data in our databases due to temporary dev data and previous developers. We have lots of orphaned, programs that don't truly exist, references to users that don't exist etc.
Once this is done, we have to apply automated testing to the getProgramUsersById function, as with broken data, testing this is unrealistic.