summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Migration
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 13:53:09 +0100
commited999066e5e05fc569c1a9940e64aa13a916ddc8 (patch)
tree69af8b0fe2446718e52e70da6e777762cc028d51 /apps/dav/lib/Migration
parent4f30c2fbe43e0d6f24ba3bff881526b2b6c2747d (diff)
downloadnextcloud-server-ed999066e5e05fc569c1a9940e64aa13a916ddc8.tar.gz
nextcloud-server-ed999066e5e05fc569c1a9940e64aa13a916ddc8.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/dav/lib/Migration')
-rw-r--r--apps/dav/lib/Migration/Version1004Date20170825134824.php8
-rw-r--r--apps/dav/lib/Migration/Version1004Date20170919104507.php8
-rw-r--r--apps/dav/lib/Migration/Version1004Date20170924124212.php8
-rw-r--r--apps/dav/lib/Migration/Version1004Date20170926103422.php3
4 files changed, 12 insertions, 15 deletions
diff --git a/apps/dav/lib/Migration/Version1004Date20170825134824.php b/apps/dav/lib/Migration/Version1004Date20170825134824.php
index dceb1ffbbdc..26855c2e23e 100644
--- a/apps/dav/lib/Migration/Version1004Date20170825134824.php
+++ b/apps/dav/lib/Migration/Version1004Date20170825134824.php
@@ -23,20 +23,20 @@
*/
namespace OCA\DAV\Migration;
-use Doctrine\DBAL\Schema\Schema;
+use OCP\DB\ISchemaWrapper;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
class Version1004Date20170825134824 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('addressbooks')) {
diff --git a/apps/dav/lib/Migration/Version1004Date20170919104507.php b/apps/dav/lib/Migration/Version1004Date20170919104507.php
index d4c7026aea8..2cf4065011b 100644
--- a/apps/dav/lib/Migration/Version1004Date20170919104507.php
+++ b/apps/dav/lib/Migration/Version1004Date20170919104507.php
@@ -23,7 +23,7 @@
*/
namespace OCA\DAV\Migration;
-use Doctrine\DBAL\Schema\Schema;
+use OCP\DB\ISchemaWrapper;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
@@ -31,13 +31,13 @@ class Version1004Date20170919104507 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('addressbooks');
diff --git a/apps/dav/lib/Migration/Version1004Date20170924124212.php b/apps/dav/lib/Migration/Version1004Date20170924124212.php
index 425747af742..e3f509b2a71 100644
--- a/apps/dav/lib/Migration/Version1004Date20170924124212.php
+++ b/apps/dav/lib/Migration/Version1004Date20170924124212.php
@@ -22,7 +22,7 @@
*/
namespace OCA\DAV\Migration;
-use Doctrine\DBAL\Schema\Schema;
+use OCP\DB\ISchemaWrapper;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
@@ -30,13 +30,13 @@ class Version1004Date20170924124212 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('cards');
diff --git a/apps/dav/lib/Migration/Version1004Date20170926103422.php b/apps/dav/lib/Migration/Version1004Date20170926103422.php
index d50cbae396b..5da6465bc86 100644
--- a/apps/dav/lib/Migration/Version1004Date20170926103422.php
+++ b/apps/dav/lib/Migration/Version1004Date20170926103422.php
@@ -23,10 +23,7 @@
*/
namespace OCA\DAV\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!