Skip to content
Merged
Changes from all commits
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
chore(files_sharing): Add migration attribute for `share.reminder_sen…
…t` column

Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Sep 6, 2024
commit 1ea902a1953ce48016b50c7f84e4c33213e24c90
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
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 {

/**
Expand All @@ -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,
Expand Down