Skip to content
Closed
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
Update Version2000Date20190808074233.php
Modify 'protected function ensureEntityColumns()' to set a default of ' '. Fixes the broken automatic update from 17.0.10 to 18.0.10. 

Specifically implements the solution commented here: #23174 (comment)
  • Loading branch information
jbowen116 authored Nov 18, 2020
commit a60f1283ccaf7122b02e4f7027cc6e59fe201ea3
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ protected function ensureEntityColumns(Table $table) {
$table->addColumn('entity', Types::STRING, [
'notnull' => true,
'length' => 256,
'default' => '',
'default' => ' ',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would not removing this be the proper way to go?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blizzz Might know exactly but iirc the entity might be empty for old workflowengine rules from before Nextcloud 18 when migrating.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 18 we have a repair steps that fills the column. This is done after migration, because the column in question did not exist in 17. Setting the default to \OCA\WorkflowEngine\Entity\File::class would then be the right thing, as this is what the post migration job would do to any column that appears empty. Which would render this part of the post-migration script unnecessary, if I do not oversee anything.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blizzz Mind to do this change in a PR directly?

]);
}
if (!$table->hasColumn('events')) {
Expand Down