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\Exception; |
|
|
|
|
15
|
|
|
use OCP\DB\ISchemaWrapper; |
|
|
|
|
16
|
|
|
use OCP\IDBConnection; |
|
|
|
|
17
|
|
|
use OCP\Migration\IOutput; |
|
|
|
|
18
|
|
|
use OCP\Migration\SimpleMigrationStep; |
|
|
|
|
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Auto-generated migration step: Please modify to your needs! |
22
|
|
|
* sudo -u www-data php /var/www/nextcloud/occ migrations:execute analytics 4009Date20230517190000 |
23
|
|
|
*/ |
24
|
|
|
class Version4010Date20230815190000 extends SimpleMigrationStep |
25
|
|
|
{ |
26
|
|
|
|
27
|
|
|
/** @var IDBConnection */ |
28
|
|
|
private $connection; |
29
|
|
|
|
30
|
|
|
public function __construct(IDBConnection $connection) |
31
|
|
|
{ |
32
|
|
|
$this->connection = $connection; |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @param IOutput $output |
37
|
|
|
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
38
|
|
|
* @param array $options |
39
|
|
|
* @throws Exception |
40
|
|
|
*/ |
41
|
|
|
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) |
42
|
|
|
{ |
43
|
|
|
$query = $this->connection->getQueryBuilder(); |
44
|
|
|
$query->insert('analytics_whats_new') |
45
|
|
|
->values([ |
46
|
|
|
'version' => $query->createNamedParameter('4.10.0'), |
47
|
|
|
'data' => $query->createNamedParameter('{"changelogURL":"https:\/\/github.com\/rello\/analytics\/blob\/master\/CHANGELOG.md","whatsNew":{ |
48
|
|
|
"en":{"regular":["Translation integration","Custom columns in column picker","List available values for input boxes","Table enhancements"],"admin":["New Features apply to users"]}, |
49
|
|
|
"de":{"regular":["Translation Integration","Benutzerdefinierte Spalten im Column Picker","Eingabehilfe in Formularfeldern","Tabellen Verbesserungen"],"admin":["Nur User Features"]} |
50
|
|
|
}}'), |
51
|
|
|
]) |
52
|
|
|
->executeStatement(); |
53
|
|
|
} |
54
|
|
|
} |
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