I've run into some serious wierdness with the table due to the active, working and private fields being stored as a CHAR(1) rather than TINYINT(1). Here's a patch to treat them differently and the (My)SQL needed to update the tables.

UPDATE file SET `active`= 1 WHERE `active`LIKE 't';
UPDATE file SET `active`= 0 WHERE `active`!= 1;
UPDATE file SET `working`= 1 WHERE `working`LIKE 't';
UPDATE file SET `working`= 0 WHERE `working`!= 1;
UPDATE file SET `private`= 1 WHERE `private`LIKE 't';
UPDATE file SET `private`= 0 WHERE `private`!= 1;

ALTER TABLE file MODIFY COLUMN `active` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
 MODIFY COLUMN `working` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
 MODIFY COLUMN `private` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
}
CommentFileSizeAuthor
filemanager.module_boolean_fields.patch3.61 KBdrewish

Comments

drewish’s picture

Priority: Normal » Critical