Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Fixed

- Fix containers migration while adding `is_recursive` field
- Fix container update from other context (like plugins)
- Fix "not equals" search operator for dropdown `multiple`

Expand Down
5 changes: 4 additions & 1 deletion templates/container.class.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ class %%CLASSNAME%% extends PluginFieldsAbstractContainerInstance
* This block ensures that the 'is_recursive' field is created and populated if it
* associated item type requires recursive assignment
*/
if (getItemForItemtype("%%ITEMTYPE%%")->maybeRecursive() && !$DB->fieldExists($table, 'is_recursive')) {
if (
getItemForItemtype("%%ITEMTYPE%%")->maybeRecursive()
&& !$DB->fieldExists($table, 'is_recursive')
&& $DB->fieldExists($table, 'entities_id')) {
$migration->addField($table, 'is_recursive', 'bool', ['after' => 'entities_id']);
$migration->addKey($table, 'is_recursive');
$migration->executeMigration();
Expand Down