Merge pull request #455 from nextcloud/hotfix/noid/issue-with-mb4

force large field to 1000
pull/454/head
Julius Härtl 2019-03-07 08:14:36 +01:00 zatwierdzone przez GitHub
commit 90779e4e6c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 13 dodań i 0 usunięć

Wyświetl plik

@ -79,6 +79,9 @@ class Version0002Date20190226000001 extends SimpleMigrationStep {
[CoreRequestBuilder::TABLE_SERVER_FOLLOWS, 'object_id'],
[CoreRequestBuilder::TABLE_SERVER_FOLLOWS, 'follow_id'],
[CoreRequestBuilder::TABLE_SERVER_NOTES, 'to_array'],
[CoreRequestBuilder::TABLE_SERVER_NOTES, 'cc'],
[CoreRequestBuilder::TABLE_SERVER_NOTES, 'bcc'],
[CoreRequestBuilder::TABLE_SERVER_NOTES, 'id'],
[CoreRequestBuilder::TABLE_SERVER_NOTES, 'to'],
[CoreRequestBuilder::TABLE_SERVER_NOTES, 'attributed_to'],
@ -137,12 +140,22 @@ class Version0002Date20190226000001 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @throws SchemaException
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
foreach (array_merge(self::$editToText, self::$editToChar1000) as $edit) {
list($tableName, $field) = $edit;
$table = $schema->getTable($tableName);
if (!$table->hasColumn($field)) {
continue;
}
$qb = $this->connection->getQueryBuilder();
$qb->update($tableName)
->set($field . '_copy', $field)