From 0569f363ee99a412148df6b6b186075bd4eab5f3 Mon Sep 17 00:00:00 2001 From: Koen Martens Date: Tue, 11 Jul 2017 19:19:14 +0200 Subject: [PATCH] Stash migration experiment (#191) --- appinfo/info.xml | 8 +++- lib/Migration/MigrateStatusFlags.php | 60 ++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 lib/Migration/MigrateStatusFlags.php diff --git a/appinfo/info.xml b/appinfo/info.xml index 6f97c052f0..099f3d824f 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -8,7 +8,7 @@ Before you update to a new version, [check the changelog](https://github.com/nextcloud/news/blob/master/CHANGELOG.md) to avoid surprises. **Important**: To enable feed updates you will need to enable either [Nextcloud system cron](https://docs.nextcloud.com/server/10/admin_manual/configuration_server/background_jobs_configuration.html#cron) or use [an updater](https://github.com/nextcloud/news-updater) which uses the built in update API and disable cron updates. More information can be found [in the README](https://github.com/nextcloud/news).]]> - 11.0.5 + 11.0.6 agpl Bernhard Posselt Alessandro Cosentino @@ -42,6 +42,12 @@ Before you update to a new version, [check the changelog](https://github.com/nex OCA\News\Cron\Updater + + + OCA\News\Migration\MigrateStatusFlags + + + OCA\News\Settings\Admin OCA\News\Settings\Section diff --git a/lib/Migration/MigrateStatusFlags.php b/lib/Migration/MigrateStatusFlags.php new file mode 100644 index 0000000000..6992efeaa3 --- /dev/null +++ b/lib/Migration/MigrateStatusFlags.php @@ -0,0 +1,60 @@ + + * + * @author Koen Martens + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ +namespace OCA\News\Migration; + +use OCP\Migration\IRepairStep; +use OCP\Migration\IOutput; + +class MigrateStatusFlags implements IRepairStep { + + /** @var IDBConnection */ + private $db; + + /** @var IJobList */ + private $jobList; + + /** @var IConfig */ + private $config; + + /** + * @param IDBConnection $db + * @param IJobList $jobList + * @param IConfig $config + */ +/* public function __construct(IDBConnection $db, + IJobList $jobList, + IConfig $config) { + $this->db = $db; + $this->jobList = $jobList; + $this->config = $config; + }*/ + + public function getName() { + return "Migrating status flags from binary encoded int column to boolean columns"; + } + + public function run(IOutput $output) { + $output->info($this->getName()); + } + +}