Posted by drewish on February 21, 2006 at 4:45am
Jump to:
| Project: | Filemanager |
| Version: | master |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
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;
}| Attachment | Size |
|---|---|
| filemanager.module_boolean_fields.patch | 3.61 KB |
Comments
#1