kopia lustrzana https://github.com/nextcloud/social
Merge pull request #455 from nextcloud/hotfix/noid/issue-with-mb4
force large field to 1000pull/454/head
commit
90779e4e6c
|
|
@ -79,6 +79,9 @@ class Version0002Date20190226000001 extends SimpleMigrationStep {
|
||||||
[CoreRequestBuilder::TABLE_SERVER_FOLLOWS, 'object_id'],
|
[CoreRequestBuilder::TABLE_SERVER_FOLLOWS, 'object_id'],
|
||||||
[CoreRequestBuilder::TABLE_SERVER_FOLLOWS, 'follow_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, 'id'],
|
||||||
[CoreRequestBuilder::TABLE_SERVER_NOTES, 'to'],
|
[CoreRequestBuilder::TABLE_SERVER_NOTES, 'to'],
|
||||||
[CoreRequestBuilder::TABLE_SERVER_NOTES, 'attributed_to'],
|
[CoreRequestBuilder::TABLE_SERVER_NOTES, 'attributed_to'],
|
||||||
|
|
@ -137,12 +140,22 @@ class Version0002Date20190226000001 extends SimpleMigrationStep {
|
||||||
* @param IOutput $output
|
* @param IOutput $output
|
||||||
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
|
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
|
||||||
* @param array $options
|
* @param array $options
|
||||||
|
*
|
||||||
|
* @throws SchemaException
|
||||||
*/
|
*/
|
||||||
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
|
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
|
||||||
|
|
||||||
|
/** @var ISchemaWrapper $schema */
|
||||||
|
$schema = $schemaClosure();
|
||||||
|
|
||||||
foreach (array_merge(self::$editToText, self::$editToChar1000) as $edit) {
|
foreach (array_merge(self::$editToText, self::$editToChar1000) as $edit) {
|
||||||
list($tableName, $field) = $edit;
|
list($tableName, $field) = $edit;
|
||||||
|
|
||||||
|
$table = $schema->getTable($tableName);
|
||||||
|
if (!$table->hasColumn($field)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$qb = $this->connection->getQueryBuilder();
|
$qb = $this->connection->getQueryBuilder();
|
||||||
$qb->update($tableName)
|
$qb->update($tableName)
|
||||||
->set($field . '_copy', $field)
|
->set($field . '_copy', $field)
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue