Browse Source
feat(systemtags): add color support backend
feat(systemtags): add color support backend
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>pull/49295/head
16 changed files with 133 additions and 101 deletions
-
5apps/dav/lib/SystemTag/SystemTagNode.php
-
14apps/dav/lib/SystemTag/SystemTagPlugin.php
-
2apps/dav/lib/SystemTag/SystemTagsInUseCollection.php
-
28apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php
-
2apps/systemtags/composer/composer/autoload_classmap.php
-
2apps/systemtags/composer/composer/autoload_static.php
-
8apps/systemtags/lib/Migration/Version31000Date20241018063111.php
-
43apps/systemtags/lib/Migration/Version31000Date20241114171300.php
-
1lib/composer/composer/autoload_classmap.php
-
1lib/composer/composer/autoload_static.php
-
4lib/composer/composer/installed.php
-
23lib/private/SystemTag/SystemTag.php
-
42lib/private/SystemTag/SystemTagManager.php
-
7lib/public/SystemTag/ISystemTag.php
-
4lib/public/SystemTag/ISystemTagManager.php
-
48tests/lib/SystemTag/SystemTagManagerTest.php
@ -0,0 +1,43 @@ |
|||
<?php |
|||
|
|||
declare(strict_types=1); |
|||
|
|||
/** |
|||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors |
|||
* SPDX-License-Identifier: AGPL-3.0-or-later |
|||
*/ |
|||
|
|||
namespace OCA\SystemTags\Migration; |
|||
|
|||
use Closure; |
|||
use Doctrine\DBAL\Types\Types; |
|||
use OCP\DB\ISchemaWrapper; |
|||
use OCP\Migration\Attributes\AddColumn; |
|||
use OCP\Migration\Attributes\ColumnType; |
|||
use OCP\Migration\IOutput; |
|||
use OCP\Migration\SimpleMigrationStep; |
|||
|
|||
/** |
|||
* Add objecttype index to systemtag_object_mapping |
|||
*/ |
|||
#[AddColumn(table: 'systemtag', name: 'color', type: ColumnType::STRING, description: 'Adding color for systemtag table')]
|
|||
class Version31000Date20241114171300 extends SimpleMigrationStep { |
|||
|
|||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|||
/** @var ISchemaWrapper $schema */ |
|||
$schema = $schemaClosure(); |
|||
|
|||
if ($schema->hasTable('systemtag')) { |
|||
$table = $schema->getTable('systemtag'); |
|||
|
|||
if (!$table->hasColumn('color')) { |
|||
$table->addColumn('color', Types::STRING, [ |
|||
'notnull' => false, |
|||
'length' => 6, |
|||
]); |
|||
} |
|||
} |
|||
|
|||
return $schema; |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue