aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-09-09 16:21:42 +0200
committerGitHub <noreply@github.com>2024-09-09 16:21:42 +0200
commit80e4319a2c203574e2e513c6c5f43d7bd03c9efb (patch)
tree504378be06ebcceddebb9fb4b09fbda2038cb03d /apps
parent00712c22b32589b24fc8637ca3dc8816c37b503e (diff)
parent1ea902a1953ce48016b50c7f84e4c33213e24c90 (diff)
downloadnextcloud-server-80e4319a2c203574e2e513c6c5f43d7bd03c9efb.tar.gz
nextcloud-server-80e4319a2c203574e2e513c6c5f43d7bd03c9efb.zip
Merge pull request #47803 from nextcloud/chore/add-migration-attribute
chore(files_sharing): Add migration attribute for `share.reminder_sent` column
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/Migration/Version31000Date20240821142813.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Migration/Version31000Date20240821142813.php b/apps/files_sharing/lib/Migration/Version31000Date20240821142813.php
index b063902a380..71b2c1817e6 100644
--- a/apps/files_sharing/lib/Migration/Version31000Date20240821142813.php
+++ b/apps/files_sharing/lib/Migration/Version31000Date20240821142813.php
@@ -12,9 +12,12 @@ namespace OCA\Files_Sharing\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
+use OCP\Migration\Attributes\AddColumn;
+use OCP\Migration\Attributes\ColumnType;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
+#[AddColumn(table: 'share', name: 'reminder_sent', type: ColumnType::BOOLEAN)]
class Version31000Date20240821142813 extends SimpleMigrationStep {
/**
@@ -26,6 +29,10 @@ class Version31000Date20240821142813 extends SimpleMigrationStep {
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
$schema = $schemaClosure();
$table = $schema->getTable('share');
+ if ($table->hasColumn('reminder_sent')) {
+ return null;
+ }
+
$table->addColumn('reminder_sent', Types::BOOLEAN, [
'notnull' => false,
'default' => false,