@@ -255,7 +255,8 @@ public static function install(Migration $migration): void
255255 `id` int unsigned NOT NULL AUTO_INCREMENT,
256256 `is_active` tinyint NOT NULL DEFAULT '1',
257257 `entities_id` int unsigned NOT NULL DEFAULT '0',
258- `take_item_group_ticket` tinyint NOT NULL DEFAULT '-2',
258+ `use_parent_entity` tinyint NOT NULL DEFAULT '0',
259+ `take_item_group_ticket` tinyint NOT NULL DEFAULT '-2',
259260 `take_item_group_change` tinyint NOT NULL DEFAULT '0',
260261 `take_item_group_problem` tinyint NOT NULL DEFAULT '0',
261262 `take_requester_group_ticket` int unsigned NOT NULL DEFAULT '0',
@@ -300,6 +301,16 @@ public static function install(Migration $migration): void
300301 $ DB ->doQuery ($ query );
301302 }
302303
304+ // Migration: Add use_parent_entity column if it doesn't exist
305+ if (!$ DB ->fieldExists ($ table , 'use_parent_entity ' )) {
306+ $ migration ->displayMessage ("Adding use_parent_entity field to $ table " );
307+ $ migration ->addField ($ table , 'use_parent_entity ' , 'tinyint ' , [
308+ 'after ' => 'entities_id ' ,
309+ 'value ' => 0 ,
310+ 'nodefault ' => false ,
311+ ]);
312+ }
313+
303314 $ entities = new Entity ();
304315 foreach ($ entities ->find () as $ entity ) {
305316 if (is_array ($ entity ) && isset ($ entity ['id ' ])) {
0 commit comments