Sql for list type problem to medical_problem

tekknogenius wrote on Friday, May 13, 2005:

Someone changed the list type from ‘problem’ to ‘medical_problem’ and didn’t let anyone know this. So here is the sql statement you’ll need to change your data from problem to medical_problem so that you medical_problems will show up in the summary pages.

update lists set type = ‘medical_problem’ where type = ‘problem’;

I also changed the stats.php to reflect this change.

As a reminder, let’s checkout the latest changes first and compare with whatever we changed to make sure we don’t lose a version in the process :slight_smile:

sunsetsystems wrote on Friday, May 13, 2005:

For what it’s worth, CVS has protection against change conflicts.  It will either auto-merge changes that do not overlap within a file, or it will refuse to commit and ask you to manually merge.

Regardless, I will routinely do a "cvs -n update" to see what has been changed without updating anything.

– Rod <rod at sunsetsystems dot com>

tekknogenius wrote on Saturday, May 14, 2005:

You’re right. Perhaps I should have said, to make sure that the changes we make don’t walk on the changes already made.

My post was talking about that very thing. The original problem list had the type ‘problem’, someone changed it to ‘medical_problem’, but there were other errors (at that time), so I changed it back to ‘problem’ since I was already using it as such. Anyway, someone changed it back to ‘medical_problem’, but only in one part, which caused the medical problems not to show up in the summary page, nor in the list on the entry screen. So, I changed the other parts to medical_problem for consistency/so it would work again.

I made the post to make others aware that if they were using CVS code from the last two weeks or so, they would probably need to update the lists table so it would work as expected.

sunsetsystems wrote on Saturday, May 14, 2005:

I guess that was me.  However it appears the prior version (1.4) of medical_problems.php was not right either, as it was writing the list item as type "problem" but trying to read it as type "medical_problem" (in the getListByType() call).

Anyway, thanks for fixing it.

– Rod <rod at sunsetsystems dot com>