aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2022-03-15 17:59:21 +0100
committerGitHub <noreply@github.com>2022-03-15 17:59:21 +0100
commita40dac93547737efbaaa39911de4fddec0e8bad4 (patch)
tree2009711cd7199f85a55989c951f0194cb22c6cb3
parent6c01863d392e01651fb7d517083ce36f47ade91f (diff)
parent3031eb1c07c7ab305cb035070be8f0a24e5bba1f (diff)
downloadnextcloud-server-a40dac93547737efbaaa39911de4fddec0e8bad4.tar.gz
nextcloud-server-a40dac93547737efbaaa39911de4fddec0e8bad4.zip
Merge pull request #31579 from nextcloud/nickvergessen-patch-1
Also add the column when the table already existed
-rw-r--r--core/Migrations/Version24000Date20211222112246.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/Migrations/Version24000Date20211222112246.php b/core/Migrations/Version24000Date20211222112246.php
index a265bebcd86..4c09c8802ab 100644
--- a/core/Migrations/Version24000Date20211222112246.php
+++ b/core/Migrations/Version24000Date20211222112246.php
@@ -45,12 +45,14 @@ class Version24000Date20211222112246 extends SimpleMigrationStep {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
+ $action = false;
$comments = $schema->getTable('comments');
if (!$comments->hasColumn('reactions')) {
$comments->addColumn('reactions', Types::STRING, [
'notnull' => false,
'length' => 4000,
]);
+ $action = true;
}
if (!$schema->hasTable(self::TABLE_NAME)) {
@@ -89,8 +91,8 @@ class Version24000Date20211222112246 extends SimpleMigrationStep {
$table->addIndex(['reaction'], 'comment_reaction');
$table->addIndex(['parent_id'], 'comment_reaction_parent_id');
$table->addUniqueIndex(['parent_id', 'actor_type', 'actor_id', 'reaction'], 'comment_reaction_unique');
- return $schema;
+ $action = true;
}
- return null;
+ return $action ? $schema : null;
}
}