Skip to content

Commit 36e7f72

Browse files
committed
fix(PhishingDetection): Add migration for newly added flag_phishing column
Signed-off-by: David Dreschner <[email protected]>
1 parent 0b65e78 commit 36e7f72

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
7+
* SPDX-License-Identifier: AGPL-3.0-or-later
8+
*/
9+
10+
namespace OCA\Mail\Migration;
11+
12+
use Closure;
13+
use OCP\DB\ISchemaWrapper;
14+
use OCP\DB\Types;
15+
use OCP\Migration\IOutput;
16+
use OCP\Migration\SimpleMigrationStep;
17+
use Override;
18+
19+
class Version5700Date20251218204405 extends SimpleMigrationStep {
20+
/**
21+
* @param IOutput $output
22+
* @param Closure(): ISchemaWrapper $schemaClosure
23+
* @param array $options
24+
* @return null|ISchemaWrapper
25+
*/
26+
#[Override]
27+
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
28+
/** @var ISchemaWrapper $schema */
29+
$schema = $schemaClosure();
30+
31+
$messagesTable = $schema->getTable('mail_messages');
32+
$messagesTable->addColumn('flag_phishing', Types::BOOLEAN, [
33+
'notnull' => false,
34+
'default' => false,
35+
]);
36+
37+
return $schema;
38+
}
39+
}

0 commit comments

Comments
 (0)