Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure string column limit of 4.000 characters #31679

Merged
Merged
Changes from 1 commit
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
Prev Previous commit
Remove unneeded preSchemaChange and return null if no changes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc committed Mar 31, 2022
commit ddfa2f221ec454447f607c5b0fd3034b5f5a2d85
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@

class Version1016Date20220324154536 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*/
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
// FIXME do we need to check for 4000+ values?
}

/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
Expand All @@ -55,8 +46,9 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt

if ($column->getLength() > 4000) {
$column->setLength(4000);
return $schema;
}

return $schema;
return null;
}
}