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; |
||
0 ignored issues
–
show
|
|||
15 | use OCP\IDBConnection; |
||
0 ignored issues
–
show
The type
OCP\IDBConnection was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
16 | use OCP\Migration\IOutput; |
||
0 ignored issues
–
show
The type
OCP\Migration\IOutput was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
17 | use OCP\Migration\SimpleMigrationStep; |
||
0 ignored issues
–
show
The type
OCP\Migration\SimpleMigrationStep was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
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 4009Date20230410190000 |
||
22 | */ |
||
23 | class Version4009Date20230410190000 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->delete('analytics_share') |
||
62 | ->where($query->expr()->isNotNull('parent')) |
||
63 | ->executeStatement(); |
||
64 | } |
||
65 | } |
||
66 |
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