fix: [data model] fixed a bug that caused org_id fields to be tinyint(1) for org_ids on tags

pull/3989/head
iglocska 2019-01-01 16:37:15 +01:00
parent 1b1fca34ce
commit 2e38015e8e
1 changed files with 5 additions and 1 deletions

View File

@ -71,7 +71,8 @@ class AppModel extends Model
1 => false, 2 => false, 3 => false, 4 => true, 5 => false, 6 => false,
7 => false, 8 => false, 9 => false, 10 => false, 11 => false, 12 => false,
13 => false, 14 => false, 15 => false, 18 => false, 19 => false, 20 => false,
21 => false, 22 => false, 23 => false, 24 => false, 25 => false, 26 => false
21 => false, 22 => false, 23 => false, 24 => false, 25 => false, 26 => false,
27 => false
);
public function afterSave($created, $options = array())
@ -1082,6 +1083,9 @@ class AppModel extends Model
INDEX `user_id` (`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;";
break;
case 27:
$sqlArray[] = 'ALTER TABLE `tags` CHANGE `org_id` `org_id` int(11) NOT NULL DEFAULT 0;';
break;
case 'fixNonEmptySharingGroupID':
$sqlArray[] = 'UPDATE `events` SET `sharing_group_id` = 0 WHERE `distribution` != 4;';
$sqlArray[] = 'UPDATE `attributes` SET `sharing_group_id` = 0 WHERE `distribution` != 4;';