BUG: table for form_reviewofs is gone

bradymiller wrote on Sunday, May 24, 2009:

hey,
  While sleuthing through openemr for internationalization stuff, while trying to use oe of the ROS forms, I was told the form_reviewofs was gone. Lo and behold the table is not there anymore (I confirmed it was there in 3.0.1 release). I then tried to import this table directly through phpmyadmin and got this error:
Error
SQL query:
CREATE TABLE `form_reviewofs` ( `id` bigint(20) NOT NULL auto_increment, `date` datetime default NULL, `pid` bigint(20) default NULL, `user` varchar(255) default NULL, `groupname` varchar(255) default NULL, `authorized` tinyint(4) default NULL, `activity` tinyint(4) default NULL, `fever` varchar(255) default NULL, `chills` varchar(255) default NULL, `night_sweats` varchar(255) default NULL, `weight_loss` varchar(255) default NULL, `poor_appetite` varchar(255) default NULL, `insomnia` varchar(255) default NULL, `fatigued` varchar(255) default NULL, `depressed` varchar(255) default NULL, `hyperactive` varchar(255) default NULL, `exposure_to_foreign_countries` varchar(255) default NULL, `cataracts` varchar(255) default NULL, `cataract_surgery` varchar(255) default NULL, `glaucoma` varchar(255) default NULL, `double_vision` varchar(255) default NULL, `blurred_vision` varchar(255) default NULL, `poor_hearing` varchar(255) default NULL, `heada[…]

MySQL said: Documentation
#1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs

The UTF8 format pushed the size of this thing over the limit. confirmed this because if I force a latin1 database then I don’t get error when improting the table and it works just fine.

Setting varchars to 255 for simple toggles seems a bit extreme?

-brady

bradymiller wrote on Tuesday, May 26, 2009:

hey,
Placed this in the bug tracker. Guessing we’ll need to decrease the number of varchars at each column.

https://sourceforge.net/tracker/?func=detail&aid=2796659&group_id=60081&atid=493001

-brady

cfapress wrote on Tuesday, May 26, 2009:

Good Grief!!!

I just looked at that form. All those varchar(255) fields hold nothing more than ‘on’ or null. They are indicators for check-boxes being checked or not checked. A simple tinyint would suffice for each of the fields in nearly the whole form. But, the easier solution is to just replace the varchar(255) with varchar(10). This leaves a little wiggle room for text values other than just ‘on’ which is what checkboxes return in submitted forms.

If this is not corrected before Friday (May 29), I’ll take on the repair task myself. It should be rather simple.

Jason

cfapress wrote on Thursday, July 23, 2009:

Geez, I really dropped the ball on this one.
I’ll add it to my to-do list for tomorrow, July 24th.

Jason