summaryrefslogtreecommitdiffstats
path: root/apps/twofactor_backupcodes/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-01-17 11:35:20 +0100
committerJoas Schilling <coding@schilljs.com>2018-01-17 11:37:36 +0100
commit4a5282ba2191059a356540165ac43dcb972eda8d (patch)
treebcf8e51b550f70f45bee4f652288ad00f57847f1 /apps/twofactor_backupcodes/lib
parent6e95bd7a518f587836124e7cb3a3762fb4a62e8c (diff)
downloadnextcloud-server-4a5282ba2191059a356540165ac43dcb972eda8d.tar.gz
nextcloud-server-4a5282ba2191059a356540165ac43dcb972eda8d.zip
Fix the type hints of migrations and correctly inject the wrapped schema into migrations
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/twofactor_backupcodes/lib')
-rw-r--r--apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php8
-rw-r--r--apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607113030.php12
-rw-r--r--apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php8
-rw-r--r--apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php3
4 files changed, 14 insertions, 17 deletions
diff --git a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php
index a7823c5b7a8..9d369ae3a8d 100644
--- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php
+++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php
@@ -23,7 +23,7 @@
namespace OCA\TwoFactorBackupCodes\Migration;
-use Doctrine\DBAL\Schema\Schema;
+use OCP\DB\ISchemaWrapper;
use Doctrine\DBAL\Types\Type;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
@@ -31,13 +31,13 @@ use OCP\Migration\IOutput;
class Version1002Date20170607104347 extends SimpleMigrationStep {
/**
* @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `Schema`
+ * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
- * @return null|Schema
+ * @return null|ISchemaWrapper
* @since 13.0.0
*/
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
- /** @var Schema $schema */
+ /** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
if (!$schema->hasTable('twofactor_backupcodes')) {
diff --git a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607113030.php b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607113030.php
index dae9e011787..6895aa44a51 100644
--- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607113030.php
+++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607113030.php
@@ -23,7 +23,7 @@
namespace OCA\TwoFactorBackupCodes\Migration;
-use Doctrine\DBAL\Schema\Schema;
+use OCP\DB\ISchemaWrapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
use OCP\Migration\SimpleMigrationStep;
@@ -43,12 +43,12 @@ class Version1002Date20170607113030 extends SimpleMigrationStep {
/**
* @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `Schema`
+ * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @since 13.0.0
*/
public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
- /** @var Schema $schema */
+ /** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
if (!$schema->hasTable('twofactor_backup_codes')) {
@@ -87,13 +87,13 @@ class Version1002Date20170607113030 extends SimpleMigrationStep {
/**
* @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `Schema`
+ * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
- * @return null|Schema
+ * @return null|ISchemaWrapper
* @since 13.0.0
*/
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
- /** @var Schema $schema */
+ /** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
if ($schema->hasTable('twofactor_backup_codes')) {
diff --git a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php
index bb35a900a1e..5cbbcb2ecca 100644
--- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php
+++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php
@@ -23,8 +23,8 @@
namespace OCA\TwoFactorBackupCodes\Migration;
-use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Type;
+use OCP\DB\ISchemaWrapper;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
@@ -32,13 +32,13 @@ class Version1002Date20170919123342 extends SimpleMigrationStep {
/**
* @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `Schema`
+ * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
- * @return null|Schema
+ * @return null|ISchemaWrapper
* @since 13.0.0
*/
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
- /** @var Schema $schema */
+ /** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
$table = $schema->getTable('twofactor_backupcodes');
diff --git a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php
index 8072ebd6810..0e19fe2a35e 100644
--- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php
+++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php
@@ -1,10 +1,7 @@
<?php
namespace OCA\TwoFactorBackupCodes\Migration;
-use Doctrine\DBAL\Schema\Schema;
use OCP\Migration\BigIntMigration;
-use OCP\Migration\SimpleMigrationStep;
-use OCP\Migration\IOutput;
/**
* Auto-generated migration step: Please modify to your needs!