diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-22 15:35:39 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-25 15:01:13 +0200 |
commit | c7542c02dbc997d818e984dae23bdf1780843559 (patch) | |
tree | eaa5e6b7230b531a4e5f494544be41449a0100f5 /lib/private/Repair/Collation.php | |
parent | a4b1d9feee79218268abcb0c20ed16bec82c993c (diff) | |
download | nextcloud-server-c7542c02dbc997d818e984dae23bdf1780843559.tar.gz nextcloud-server-c7542c02dbc997d818e984dae23bdf1780843559.zip |
Introduce OCP\Migration\IRepairStep and adopt all repair steps to this new interface - refs #24198
Diffstat (limited to 'lib/private/Repair/Collation.php')
-rw-r--r-- | lib/private/Repair/Collation.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/private/Repair/Collation.php b/lib/private/Repair/Collation.php index 48035f8d331..1376785e17d 100644 --- a/lib/private/Repair/Collation.php +++ b/lib/private/Repair/Collation.php @@ -23,9 +23,10 @@ namespace OC\Repair; use Doctrine\DBAL\Platforms\MySqlPlatform; -use OC\Hooks\BasicEmitter; +use OCP\Migration\IOutput; +use OCP\Migration\IRepairStep; -class Collation extends BasicEmitter implements \OC\RepairStep { +class Collation implements IRepairStep { /** * @var \OCP\IConfig */ @@ -52,15 +53,15 @@ class Collation extends BasicEmitter implements \OC\RepairStep { /** * Fix mime types */ - public function run() { + public function run(IOutput $output) { if (!$this->connection->getDatabasePlatform() instanceof MySqlPlatform) { - $this->emit('\OC\Repair', 'info', array('Not a mysql database -> nothing to no')); + $output->info('Not a mysql database -> nothing to no'); return; } $tables = $this->getAllNonUTF8BinTables($this->connection); foreach ($tables as $table) { - $this->emit('\OC\Repair', 'info', array("Change collation for $table ...")); + $output->info("Change collation for $table ..."); $query = $this->connection->prepare('ALTER TABLE `' . $table . '` CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;'); $query->execute(); } |