1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Analytics |
4
|
|
|
* |
5
|
|
|
* SPDX-FileCopyrightText: 2019-2022 Marcel Scherello |
6
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later |
7
|
|
|
*/ |
8
|
|
|
|
9
|
|
|
declare(strict_types=1); |
10
|
|
|
|
11
|
|
|
namespace OCA\Analytics\Migration; |
12
|
|
|
|
13
|
|
|
use Closure; |
14
|
|
|
use OCP\DB\ISchemaWrapper; |
|
|
|
|
15
|
|
|
use OCP\Migration\IOutput; |
|
|
|
|
16
|
|
|
use OCP\Migration\SimpleMigrationStep; |
|
|
|
|
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* Auto-generated migration step: Please modify to your needs! |
20
|
|
|
* sudo -u www-data php occ migrations:execute analytics 4015Date20240714200000 |
21
|
|
|
*/ |
22
|
|
|
class Version4015Date20240714200000 extends SimpleMigrationStep |
23
|
|
|
{ |
24
|
|
|
public function __construct() |
25
|
|
|
{ |
26
|
|
|
} |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @param IOutput $output |
30
|
|
|
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
31
|
|
|
* @param array $options |
32
|
|
|
* @return null|ISchemaWrapper |
33
|
|
|
*/ |
34
|
|
|
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) |
35
|
|
|
{ |
36
|
|
|
/** @var ISchemaWrapper $schema */ |
37
|
|
|
$schema = $schemaClosure(); |
38
|
|
|
|
39
|
|
|
$table = $schema->getTable('analytics_dataset'); |
40
|
|
|
if (!$table->hasColumn('ai_index')) { |
41
|
|
|
$table->addColumn('ai_index', 'integer', [ |
42
|
|
|
'notnull' => false |
43
|
|
|
]); |
44
|
|
|
} |
45
|
|
|
if ($table->hasColumn('chartoptions')) { |
46
|
|
|
$table->dropColumn('chartoptions'); |
47
|
|
|
} |
48
|
|
|
if ($table->hasColumn('dataoptions')) { |
49
|
|
|
$table->dropColumn('dataoptions'); |
50
|
|
|
} |
51
|
|
|
if ($table->hasColumn('filteroptions')) { |
52
|
|
|
$table->dropColumn('filteroptions'); |
53
|
|
|
} |
54
|
|
|
if ($table->hasColumn('refresh')) { |
55
|
|
|
$table->dropColumn('refresh'); |
56
|
|
|
} |
57
|
|
|
if ($table->hasColumn('link')) { |
58
|
|
|
$table->dropColumn('link'); |
59
|
|
|
} |
60
|
|
|
if ($table->hasColumn('visualization')) { |
61
|
|
|
$table->dropColumn('visualization'); |
62
|
|
|
} |
63
|
|
|
if ($table->hasColumn('chart')) { |
64
|
|
|
$table->dropColumn('chart'); |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
$table = $schema->getTable('analytics_share'); |
68
|
|
|
if (!$table->hasColumn('panorama')) { |
69
|
|
|
$table->addColumn('panorama', 'integer', [ |
70
|
|
|
'notnull' => false, |
71
|
|
|
]); |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
return $schema; |
75
|
|
|
} |
76
|
|
|
} |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths