-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
90 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
/** | ||
* Analytics | ||
* | ||
* SPDX-FileCopyrightText: 2019-2022 Marcel Scherello | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OCA\Analytics\Migration; | ||
|
||
use Closure; | ||
use OCP\DB\Exception; | ||
use OCP\DB\ISchemaWrapper; | ||
use OCP\IDBConnection; | ||
use OCP\Migration\IOutput; | ||
use OCP\Migration\SimpleMigrationStep; | ||
|
||
/** | ||
* Auto-generated migration step: Please modify to your needs! | ||
* sudo -u www-data php /var/www/nextcloud/occ migrations:execute analytics 5000Date20240915190000 | ||
*/ | ||
class Version5000Date20240915190000 extends SimpleMigrationStep | ||
{ | ||
|
||
/** @var IDBConnection */ | ||
private $connection; | ||
|
||
public function __construct(IDBConnection $connection) | ||
{ | ||
$this->connection = $connection; | ||
} | ||
|
||
/** | ||
* @param IOutput $output | ||
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` | ||
* @param array $options | ||
* @throws Exception | ||
*/ | ||
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) | ||
{ | ||
$query = $this->connection->getQueryBuilder(); | ||
$query->insert('analytics_whats_new') | ||
->values([ | ||
'version' => $query->createNamedParameter('5.0.0'), | ||
'data' => $query->createNamedParameter('{"changelogURL":"https:\/\/github.com\/rello\/analytics\/blob\/master\/CHANGELOG.md","whatsNew":{ | ||
"en":{"regular":["Panoramas - multi page dashboards","AI Assistant - Context Chat integration","Presentation mode", "Dark mode coming later"],"admin":["New Features apply to users"]}, | ||
"de":{"regular":["Panoramas - mehrseitige Dashboards","AI Assistant - Context Chat Integration","Präsentations Modus","Dark Mode folgt"],"admin":["Nur User Features"]} | ||
}}'), | ||
]) | ||
->executeStatement(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters