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\IDBConnection; |
|
|
|
|
16
|
|
|
use OCP\Migration\IOutput; |
|
|
|
|
17
|
|
|
use OCP\Migration\SimpleMigrationStep; |
|
|
|
|
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* Auto-generated migration step: Please modify to your needs! |
21
|
|
|
* sudo -u www-data php /var/www/nextcloud/occ migrations:execute analytics 4006Date20221222190000 |
22
|
|
|
*/ |
23
|
|
|
class Version4006Date20221222190000 extends SimpleMigrationStep |
24
|
|
|
{ |
25
|
|
|
|
26
|
|
|
/** @var IDBConnection */ |
27
|
|
|
private $connection; |
28
|
|
|
|
29
|
|
|
public function __construct(IDBConnection $connection) |
30
|
|
|
{ |
31
|
|
|
$this->connection = $connection; |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @param IOutput $output |
36
|
|
|
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
37
|
|
|
* @param array $options |
38
|
|
|
*/ |
39
|
|
|
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) |
40
|
|
|
{ |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @param IOutput $output |
45
|
|
|
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
46
|
|
|
* @param array $options |
47
|
|
|
* @return null|ISchemaWrapper |
48
|
|
|
*/ |
49
|
|
|
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) |
50
|
|
|
{ |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @param IOutput $output |
55
|
|
|
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
56
|
|
|
* @param array $options |
57
|
|
|
*/ |
58
|
|
|
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) |
59
|
|
|
{ |
60
|
|
|
$query = $this->connection->getQueryBuilder(); |
61
|
|
|
$query->insert('analytics_whats_new') |
62
|
|
|
->values([ |
63
|
|
|
'version' => $query->createNamedParameter('4.6.0'), |
64
|
|
|
'data' => $query->createNamedParameter('{"changelogURL":"https:\/\/github.com\/rello\/analytics\/blob\/master\/CHANGELOG.md","whatsNew":{ |
65
|
|
|
"en":{"regular":["Notifications for failed data loads","Schedule deletion jobs per dataset to clean up old data","Various fixes"],"admin":["New Features apply to users"]}, |
66
|
|
|
"de":{"regular":["Benachrichtigung bei fehlerhaften Datenladungen","Plane Löschjobs je Datensatz um alte Daten zu bereinigen","Verschiedene Korrekturen"],"admin":["Nur User Features"]} |
67
|
|
|
}}'), |
68
|
|
|
]) |
69
|
|
|
->execute(); |
70
|
|
|
} |
71
|
|
|
} |
72
|
|
|
|
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